diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2012-01-16 19:19:42 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2012-01-16 19:27:05 -0300 |
commit | 3b11247aadf857bbcbfc765191273973d9ca9dd7 (patch) | |
tree | 7ab29e4e964f397c088c8850555992d3ccae4f6f /doc/src | |
parent | 1b9f774090d58a950ef0535b51bc377ab62b795c (diff) | |
download | postgresql-3b11247aadf857bbcbfc765191273973d9ca9dd7.tar.gz postgresql-3b11247aadf857bbcbfc765191273973d9ca9dd7.zip |
Disallow merging ONLY constraints in children tables
When creating a child table, or when attaching an existing table as
child of another, we must not allow inheritable constraints to be
merged with non-inheritable ones, because then grandchildren would not
properly get the constraint. This would violate the grandparent's
expectations.
Bugs noted by Robert Haas.
Author: Nikhil Sontakke
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/alter_table.sgml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 1976f6dcede..6f1917f5c47 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -482,7 +482,11 @@ ALTER TABLE <replaceable class="PARAMETER">name</replaceable> <para> There must also be matching child-table constraints for all - <literal>CHECK</literal> constraints of the parent. Currently + <literal>CHECK</literal> constraints of the parent, except those + marked non-inheritable (that is, created with <literal>ALTER TABLE ONLY</literal>) + in the parent, which are ignored; all child-table constraints matched + must not be marked non-inheritable. + Currently <literal>UNIQUE</literal>, <literal>PRIMARY KEY</literal>, and <literal>FOREIGN KEY</literal> constraints are not considered, but this might change in the future. |