"stalker" <chim...@bk.ru> writes:
> I try to create Check Constraints for DB with Nested Set data model. When I
> write complex validation rule with OR-operator - result Description is
> incorrect.

> ALTER TABLE Catalog
>   ADD CONSTRAINT ctg_check_ns CHECK (id_lft > id_rgt OR (id_lft = 0 AND
> id_lft = 0));

> Result: 
>   'ctg_check_ns' Definition == "id_lft > id_rgt OR id_lft = 0 AND id_lft =
> 0".

Looks perfectly correct to me.  AND binds more tightly than OR.

                        regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to