1 /*-------------------------------------------------------------------------
4 * prototypes for functions in backend/catalog/heap.c
7 * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $Id: heap.h,v 1.56 2002/09/02 01:05:06 tgl Exp $
12 *-------------------------------------------------------------------------
17 #include "catalog/pg_attribute.h"
18 #include "nodes/parsenodes.h"
19 #include "parser/parse_node.h"
20 #include "utils/rel.h"
23 typedef struct RawColumnDefault
25 AttrNumber attnum; /* attribute to attach default to */
26 Node *raw_default; /* default value (untransformed parse
30 extern Relation heap_create(const char *relname,
35 bool allow_system_table_mods);
37 extern void heap_storage_create(Relation rel);
39 extern Oid heap_create_with_catalog(const char *relname,
44 bool allow_system_table_mods);
46 extern void heap_drop_with_catalog(Oid rid);
48 extern void heap_truncate(Oid rid);
50 extern void AddRelationRawConstraints(Relation rel,
52 List *rawConstraints);
54 extern Node *cookDefault(ParseState *pstate,
60 extern int RemoveRelConstraints(Relation rel, const char *constrName,
61 DropBehavior behavior);
63 extern void DeleteRelationTuple(Oid relid);
64 extern void DeleteAttributeTuples(Oid relid);
65 extern void RemoveAttributeById(Oid relid, AttrNumber attnum);
66 extern void RemoveAttrDefault(Oid relid, AttrNumber attnum,
67 DropBehavior behavior, bool complain);
68 extern void RemoveAttrDefaultById(Oid attrdefId);
70 extern Form_pg_attribute SystemAttributeDefinition(AttrNumber attno,
73 extern Form_pg_attribute SystemAttributeByName(const char *attname,