From: Tom Lane Date: Thu, 28 Dec 2006 20:02:38 +0000 (+0000) Subject: Remove caveat about avoiding cross-type operators in constraints intended X-Git-Tag: REL8_3_BETA1~1636 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1b8a55ec8cc9d77581ad144122f7f7163d82282;p=postgresql Remove caveat about avoiding cross-type operators in constraints intended for use with constraint exclusion. We can prove those cases now... --- diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index dee6bc7034..6dd740fbfe 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -1,4 +1,4 @@ - + Data Definition @@ -2784,29 +2784,6 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate >= DATE '2006-01-01'; - - - Avoid cross-data type comparisons in the CHECK - constraints, as the planner will currently fail to prove such - conditions false. For example, the following constraint - will work if x is an integer - column, but not if x is a - bigint: - -CHECK ( x = 1 ) - - For a bigint column we must use a constraint like: - -CHECK ( x = 1::bigint ) - - The problem is not limited to the bigint data type - — it can occur whenever the default data type of the - constant does not match the data type of the column to which it - is being compared. Cross-data type comparisons in the supplied - queries are usually OK, just not in the CHECK conditions. - - - All constraints on all partitions of the master table are considered for