The following bug has been logged on the website:
Bug reference: 11705
Logged by: Joel Finkel
Email address: finkel(at)sd-il(dot)com
PostgreSQL version: 9.1.13
Operating system: x86_64-unknown-linux-gnu
Description:
We have a table with this constraint:
CONSTRAINT check_m_nullability CHECK (((m1 IS NULL) AND (m2 IS NULL)) OR
((m1 IS NOT NULL) AND (m2 IS NOT NULL)))
When we \d <table name> it is listed as:
Check constraints:
"check_m_nullability" CHECK (m1 IS NULL AND m2 IS NULL OR m1 IS NOT NULL
AND m2 IS NOT NULL)"
The application of the constraint appears to be correct. The problem is
that \d is dropping important parentheses in its output; so it is showing an
incorrect description.