]> granicus.if.org Git - postgresql/blob - src/include/catalog/heap.h
Make OIDs optional, per discussions in pghackers. WITH OIDS is still the
[postgresql] / src / include / catalog / heap.h
1 /*-------------------------------------------------------------------------
2  *
3  * heap.h
4  *        prototypes for functions in lib/catalog/heap.c
5  *
6  *
7  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: heap.h,v 1.37 2001/08/10 18:57:39 tgl Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef HEAP_H
15 #define HEAP_H
16
17 #include "catalog/pg_attribute.h"
18 #include "utils/rel.h"
19
20 typedef struct RawColumnDefault
21 {
22         AttrNumber      attnum;                 /* attribute to attach default to */
23         Node       *raw_default;        /* default value (untransformed parse
24                                                                  * tree) */
25 } RawColumnDefault;
26
27 extern Oid      RelnameFindRelid(const char *relname);
28
29 extern Relation heap_create(char *relname, TupleDesc tupDesc,
30                         bool istemp, bool storage_create,
31                         bool allow_system_table_mods);
32
33 extern void heap_storage_create(Relation rel);
34
35 extern Oid heap_create_with_catalog(char *relname, TupleDesc tupdesc,
36                                                  char relkind, bool relhasoids, bool istemp,
37                                                  bool allow_system_table_mods);
38
39 extern void heap_drop_with_catalog(const char *relname,
40                                            bool allow_system_table_mods);
41
42 extern void heap_truncate(char *relname);
43
44 extern void AddRelationRawConstraints(Relation rel,
45                                                   List *rawColDefaults,
46                                                   List *rawConstraints);
47
48 extern int RemoveCheckConstraint(Relation rel, const char *constrName, bool inh);
49
50
51 extern Form_pg_attribute SystemAttributeDefinition(AttrNumber attno,
52                                                                                                    bool relhasoids);
53
54 #endif   /* HEAP_H */