postgres 约束 多个条件 联合 约束

ADD CONSTRAINT xxx CHECK (
  (col1 = 0.0) = (col2 IS NOT NULL)
);

## 相当于check (true = ture)

原文地址:https://www.cnblogs.com/alangwansui/p/5704267.html