aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/typecmds.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2011-12-05 15:10:18 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2011-12-19 17:30:23 -0300
commit61d81bd28dbec65a6b144e0cd3d0bfe25913c3ac (patch)
treebc99d53c06bed6dcc146f7eb97babba998eb5e1d /src/backend/commands/typecmds.c
parent92203624934095163f8b57b5b3d7bbd2645da2c8 (diff)
downloadpostgresql-61d81bd28dbec65a6b144e0cd3d0bfe25913c3ac.tar.gz
postgresql-61d81bd28dbec65a6b144e0cd3d0bfe25913c3ac.zip
Allow CHECK constraints to be declared ONLY
This makes them enforceable only on the parent table, not on children tables. This is useful in various situations, per discussion involving people bitten by the restrictive behavior introduced in 8.4. Message-Id: 8762mp93iw.fsf@comcast.net CAFaPBrSMMpubkGf4zcRL_YL-AERUbYF_-ZNNYfb3CVwwEqc9TQ@mail.gmail.com Authors: Nikhil Sontakke, Alex Hunsaker Reviewed by Robert Haas and myself
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r--src/backend/commands/typecmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index 2b8f9aec384..eda43d826fa 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -2934,7 +2934,8 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid,
ccbin, /* Binary form of check constraint */
ccsrc, /* Source form of check constraint */
true, /* is local */
- 0); /* inhcount */
+ 0, /* inhcount */
+ false); /* is only */
/*
* Return the compiled constraint expression so the calling routine can