-
+
Data Definition
-
- 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