From 3b11247aadf857bbcbfc765191273973d9ca9dd7 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 16 Jan 2012 19:19:42 -0300 Subject: 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 --- doc/src/sgml/ref/alter_table.sgml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc/src') 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 name There must also be matching child-table constraints for all - CHECK constraints of the parent. Currently + CHECK constraints of the parent, except those + marked non-inheritable (that is, created with ALTER TABLE ONLY) + in the parent, which are ignored; all child-table constraints matched + must not be marked non-inheritable. + Currently UNIQUE, PRIMARY KEY, and FOREIGN KEY constraints are not considered, but this might change in the future. -- cgit v1.2.3