BUG #13203: XOR Check looks missing parens in \d

Started by Nonamealmost 11 years ago2 messagesbugs
Jump to latest
#1Noname
robertmassaioli@gmail.com

The following bug has been logged on the website:

Bug reference: 13203
Logged by: Robert Massaioli
Email address: robertmassaioli@gmail.com
PostgreSQL version: 9.4.1
Operating system: OSX
Description:

This is simple to reproduce. First create the following database table and
then run the psql session as documented here:
https://bitbucket.org/snippets/robertmassaioli/rqpz

Now, the issue is that when you do \d and view the table that has been
created the CHECK block is missing parens that show that it really will
behave as an XOR. I think this is a bug that ould be great to fix. Please
let me know if you need more information. Cheers!

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: BUG #13203: XOR Check looks missing parens in \d

robertmassaioli@gmail.com writes:

Now, the issue is that when you do \d and view the table that has been
created the CHECK block is missing parens that show that it really will
behave as an XOR. I think this is a bug that ould be great to fix. Please
let me know if you need more information. Cheers!

It's not a bug that we print check constraints without unnecessary parens,
any more than it is that we don't reproduce whitespace exactly.

Those parens are unnecessary, because per the SQL standard 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