From: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Documentation clairification?, CHECK constraints |
Date: | 2004-03-31 16:19:08 |
Message-ID: | 20040331101908.A1749@mofo.meme.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Re: http://www.postgresql.org/docs/7.4/static/sql-createtable.html
"The CHECK clause specifies an expression producing a Boolean result
which new or updated rows must satisfy for an insert or update
operation to succeed."
But SQL has 3 valued logic (strictly speaking, not boolean). It
seems that the CHECK clases fail only when the expression result
is FALSE, and pass when the result is either TRUE or UNKNOWN.
Yes? Should this be clarified in the documentation?
Somewhere along the line IIRC the rule that UNKNOWN always causes
the code inside the THEN conditional to be skipped, so explicit tests
for NULL are often needed as a 'special case'. Not that this has much
to do with CHECK clauses, but I don't see the conditionals page
for plpgsql saying anything about UNKNOWN values.
Maybe the section to describe how conditionals treat UNKNOWN is 9.1,
conditional operators?
Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
From | Date | Subject | |
---|---|---|---|
Next Message | Ericson Smith | 2004-03-31 16:35:17 | Re: Wich hardware suits best for large full-text indexed |
Previous Message | Bruce Momjian | 2004-03-31 16:19:07 | Re: Some Documentation Changes |