BUG #11705: \d(escribe) table shows incorrect check constraint

From: finkel(at)sd-il(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #11705: \d(escribe) table shows incorrect check constraint
Date: 2014-10-17 19:42:58
Message-ID: 20141017194258.2957.58603@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Steven Siebert 2014-10-17 21:20:47 Re: BUG #10680: LDAP bind password leaks to log on failed authentication
Previous Message David G Johnston 2014-10-17 16:52:39 Re: BUG #11702: Identity column error