1 /*-------------------------------------------------------------------------
4 * prototypes for functions in backend/catalog/heap.c
7 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $Id: heap.h,v 1.42 2002/03/06 20:34:55 momjian Exp $
12 *-------------------------------------------------------------------------
17 #include "catalog/pg_attribute.h"
18 #include "nodes/parsenodes.h"
19 #include "parser/parse_node.h"
20 #include "utils/rel.h"
22 typedef struct RawColumnDefault
24 AttrNumber attnum; /* attribute to attach default to */
25 Node *raw_default; /* default value (untransformed parse
29 extern Oid RelnameFindRelid(const char *relname);
31 extern Relation heap_create(char *relname, TupleDesc tupDesc,
32 bool istemp, bool storage_create,
33 bool allow_system_table_mods);
35 extern void heap_storage_create(Relation rel);
37 extern Oid heap_create_with_catalog(char *relname, TupleDesc tupdesc,
38 char relkind, bool relhasoids, bool istemp,
39 bool allow_system_table_mods);
41 extern void heap_drop_with_catalog(const char *relname,
42 bool allow_system_table_mods);
44 extern void heap_truncate(char *relname);
46 extern void AddRelationRawConstraints(Relation rel,
48 List *rawConstraints);
50 extern Node *cookDefault(ParseState *pstate
56 extern int RemoveCheckConstraint(Relation rel, const char *constrName, bool inh);
58 extern Form_pg_attribute SystemAttributeDefinition(AttrNumber attno,
61 extern Form_pg_attribute SystemAttributeByName(const char *attname,