summaryrefslogtreecommitdiff
path: root/src/backend/commands/trigger.c
diff options
context:
space:
mode:
authorAlvaro Herrera2012-07-20 16:33:34 +0000
committerAlvaro Herrera2012-07-20 18:08:07 +0000
commitf5bcd398addcbeb785f0513cf28cba5d1ecd2c8a (patch)
treee351181eb9be8b7a11a5294e002833b40e0b9ddc /src/backend/commands/trigger.c
parent8e617e29aaccfdd1b85af7f50dc83aa6dd7ef550 (diff)
connoinherit may be true only for CHECK constraints
The code was setting it true for other constraints, which is bogus. Doing so caused bogus catalog entries for such constraints, and in particular caused an error to be raised when trying to drop a constraint of types other than CHECK from a table that has children, such as reported in bug #6712. In 9.2, additionally ignore connoinherit=true for other constraint types, to avoid having to force initdb; existing databases might already contain bogus catalog entries. Includes a catversion bump (in HEAD only). Bug report from Miroslav Ć ulc Analysis from Amit Kapila and Noah Misch; Amit also contributed the patch.
Diffstat (limited to 'src/backend/commands/trigger.c')
-rw-r--r--src/backend/commands/trigger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index 1d5951ad3da..5bea2022402 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -459,7 +459,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString,
NULL,
true, /* islocal */
0, /* inhcount */
- false); /* isnoinherit */
+ true); /* isnoinherit */
}
/*