Search Postgresql Archives

Re: problem with check constraints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anton Andreev wrote:
> When I create a check constraint in PgAdmin3 1.8.4 on a Postgresql 
> 8.3.3: ((A and B) or (C and D))
> I get with create script: (A and B or C and D) which is wrong.

No, it isn't - both are the same.

AND has higher operator precedence than OR, see
http://www.postgresql.org/docs/8.3/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE

Yours,
Laurenz Albe

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux