diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-12-28 20:02:38 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-12-28 20:02:38 +0000 |
commit | e1b8a55ec8cc9d77581ad144122f7f7163d82282 (patch) | |
tree | 7f22125e389a68fe3ca0b01a4a7105f6a26f4b81 | |
parent | c99ddfc43de7d69d903d150a8d372b020371d49a (diff) | |
download | postgresql-e1b8a55ec8cc9d77581ad144122f7f7163d82282.tar.gz postgresql-e1b8a55ec8cc9d77581ad144122f7f7163d82282.zip |
Remove caveat about avoiding cross-type operators in constraints intended
for use with constraint exclusion. We can prove those cases now...
-rw-r--r-- | doc/src/sgml/ddl.sgml | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index dee6bc70340..6dd740fbfee 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.69 2006/11/28 01:09:01 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.70 2006/12/28 20:02:38 tgl Exp $ --> <chapter id="ddl"> <title>Data Definition</title> @@ -2786,29 +2786,6 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate >= DATE '2006-01-01'; <listitem> <para> - Avoid cross-data type comparisons in the <literal>CHECK</> - constraints, as the planner will currently fail to prove such - conditions false. For example, the following constraint - will work if <varname>x</varname> is an <type>integer</type> - column, but not if <varname>x</varname> is a - <type>bigint</type>: -<programlisting> -CHECK ( x = 1 ) -</programlisting> - For a <type>bigint</type> column we must use a constraint like: -<programlisting> -CHECK ( x = 1::bigint ) -</programlisting> - The problem is not limited to the <type>bigint</type> 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 <literal>CHECK</> conditions. - </para> - </listitem> - - <listitem> - <para> All constraints on all partitions of the master table are considered for constraint exclusion, so large numbers of partitions are likely to increase query planning time considerably. |