diff options
Diffstat (limited to 'src/include/catalog/heap.h')
-rw-r--r-- | src/include/catalog/heap.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h index 727af295c76..52347a65522 100644 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/heap.h,v 1.87 2008/01/01 19:45:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/catalog/heap.h,v 1.88 2008/05/09 23:32:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -29,6 +29,8 @@ typedef struct CookedConstraint char *name; /* name, or NULL if none */ AttrNumber attnum; /* which attr (only for DEFAULT) */ Node *expr; /* transformed default or check expr */ + bool is_local; /* constraint has local (non-inherited) def */ + int inhcount; /* number of times constraint is inherited */ } CookedConstraint; extern Relation heap_create(const char *relname, @@ -46,6 +48,7 @@ extern Oid heap_create_with_catalog(const char *relname, Oid relid, Oid ownerid, TupleDesc tupdesc, + List *cooked_constraints, char relkind, bool shared_relation, bool oidislocal, @@ -67,11 +70,13 @@ extern void InsertPgClassTuple(Relation pg_class_desc, Oid new_rel_oid, Datum reloptions); -extern List *AddRelationRawConstraints(Relation rel, - List *rawColDefaults, - List *rawConstraints); +extern List *AddRelationNewConstraints(Relation rel, + List *newColDefaults, + List *newConstraints, + bool allow_merge, + bool is_local); -extern void StoreAttrDefault(Relation rel, AttrNumber attnum, char *adbin); +extern void StoreAttrDefault(Relation rel, AttrNumber attnum, Node *expr); extern Node *cookDefault(ParseState *pstate, Node *raw_default, @@ -79,9 +84,6 @@ extern Node *cookDefault(ParseState *pstate, int32 atttypmod, char *attname); -extern int RemoveRelConstraints(Relation rel, const char *constrName, - DropBehavior behavior); - extern void DeleteRelationTuple(Oid relid); extern void DeleteAttributeTuples(Oid relid); extern void RemoveAttributeById(Oid relid, AttrNumber attnum); |