Remove caveat about avoiding cross-type operators in constraints intended
authorTom Lane
Thu, 28 Dec 2006 20:02:38 +0000 (20:02 +0000)
committerTom Lane
Thu, 28 Dec 2006 20:02:38 +0000 (20:02 +0000)
for use with constraint exclusion.  We can prove those cases now...

doc/src/sgml/ddl.sgml

index dee6bc70340246ba79dbe11a80716839ca24ab11..6dd740fbfeeb42044c2d2fd8681c5cf3719b3583 100644 (file)
@@ -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