summaryrefslogtreecommitdiff
path: root/src/include/catalog/heap.h
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2012-04-20 23:46:20 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2012-04-20 23:56:57 -0300
commit09ff76fcdb275769ac4d1a45a67416735613d04b (patch)
tree15d86c29de778477258b9d43128d8ed23ced6479 /src/include/catalog/heap.h
parent1f0363001166ef6a43619846e44cfb9dbe7335ed (diff)
downloadpostgresql-09ff76fcdb275769ac4d1a45a67416735613d04b.tar.gz
Recast "ONLY" column CHECK constraints as NO INHERIT
The original syntax wasn't universally loved, and it didn't allow its usage in CREATE TABLE, only ALTER TABLE. It now works everywhere, and it also allows using ALTER TABLE ONLY to add an uninherited CHECK constraint, per discussion. The pg_constraint column has accordingly been renamed connoinherit. This commit partly reverts some of the changes in 61d81bd28dbec65a6b144e0cd3d0bfe25913c3ac, particularly some pg_dump and psql bits, because now pg_get_constraintdef includes the necessary NO INHERIT within the constraint definition. Author: Nikhil Sontakke Some tweaks by me
Diffstat (limited to 'src/include/catalog/heap.h')
-rw-r--r--src/include/catalog/heap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h
index 2055382096..c0deab73ae 100644
--- a/src/include/catalog/heap.h
+++ b/src/include/catalog/heap.h
@@ -33,7 +33,8 @@ typedef struct CookedConstraint
bool skip_validation; /* skip validation? (only for CHECK) */
bool is_local; /* constraint has local (non-inherited) def */
int inhcount; /* number of times constraint is inherited */
- bool is_only; /* constraint has local def and cannot be inherited */
+ bool is_no_inherit; /* constraint has local def and cannot be
+ * inherited */
} CookedConstraint;
extern Relation heap_create(const char *relname,
@@ -92,8 +93,7 @@ extern List *AddRelationNewConstraints(Relation rel,
List *newColDefaults,
List *newConstraints,
bool allow_merge,
- bool is_local,
- bool is_only);
+ bool is_local);
extern void StoreAttrDefault(Relation rel, AttrNumber attnum, Node *expr);