1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* heap.h
|
2001-10-23 00:47:57 +02:00
|
|
|
* prototypes for functions in backend/catalog/heap.c
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
2001-01-24 20:43:33 +01:00
|
|
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2002-03-29 20:06:29 +01:00
|
|
|
* $Id: heap.h,v 1.48 2002/03/29 19:06:17 tgl Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef HEAP_H
|
|
|
|
#define HEAP_H
|
|
|
|
|
2001-05-07 02:43:27 +02:00
|
|
|
#include "catalog/pg_attribute.h"
|
2002-03-19 03:18:25 +01:00
|
|
|
#include "nodes/parsenodes.h"
|
|
|
|
#include "parser/parse_node.h"
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "utils/rel.h"
|
1996-11-05 12:23:43 +01:00
|
|
|
|
2002-03-26 20:17:02 +01:00
|
|
|
|
1999-10-04 01:55:40 +02:00
|
|
|
typedef struct RawColumnDefault
|
|
|
|
{
|
|
|
|
AttrNumber attnum; /* attribute to attach default to */
|
2000-04-12 19:17:23 +02:00
|
|
|
Node *raw_default; /* default value (untransformed parse
|
|
|
|
* tree) */
|
1999-10-04 01:55:40 +02:00
|
|
|
} RawColumnDefault;
|
|
|
|
|
2002-03-26 20:17:02 +01:00
|
|
|
extern Relation heap_create(char *relname, Oid relnamespace,
|
|
|
|
TupleDesc tupDesc,
|
2001-03-22 05:01:46 +01:00
|
|
|
bool istemp, bool storage_create,
|
|
|
|
bool allow_system_table_mods);
|
2000-07-04 08:11:54 +02:00
|
|
|
|
2000-11-08 23:10:03 +01:00
|
|
|
extern void heap_storage_create(Relation rel);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2002-03-26 20:17:02 +01:00
|
|
|
extern Oid heap_create_with_catalog(char *relname, Oid relnamespace,
|
|
|
|
TupleDesc tupdesc,
|
2001-08-10 20:57:42 +02:00
|
|
|
char relkind, bool relhasoids, bool istemp,
|
2001-03-22 05:01:46 +01:00
|
|
|
bool allow_system_table_mods);
|
2000-07-04 08:11:54 +02:00
|
|
|
|
2002-03-29 20:06:29 +01:00
|
|
|
extern void heap_drop_with_catalog(Oid rid, bool allow_system_table_mods);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2002-03-29 20:06:29 +01:00
|
|
|
extern void heap_truncate(Oid rid);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1999-10-04 01:55:40 +02:00
|
|
|
extern void AddRelationRawConstraints(Relation rel,
|
2000-04-12 19:17:23 +02:00
|
|
|
List *rawColDefaults,
|
|
|
|
List *rawConstraints);
|
1999-10-04 01:55:40 +02:00
|
|
|
|
2002-03-20 20:45:13 +01:00
|
|
|
extern Node *cookDefault(ParseState *pstate,
|
|
|
|
Node *raw_default,
|
|
|
|
Oid atttypid,
|
|
|
|
int32 atttypmod,
|
|
|
|
char *attname);
|
2002-03-19 03:18:25 +01:00
|
|
|
|
2001-10-25 07:50:21 +02:00
|
|
|
extern int RemoveCheckConstraint(Relation rel, const char *constrName, bool inh);
|
2001-05-30 14:57:36 +02:00
|
|
|
|
2001-08-10 20:57:42 +02:00
|
|
|
extern Form_pg_attribute SystemAttributeDefinition(AttrNumber attno,
|
2001-10-25 07:50:21 +02:00
|
|
|
bool relhasoids);
|
2001-05-07 02:43:27 +02:00
|
|
|
|
2001-10-23 00:47:57 +02:00
|
|
|
extern Form_pg_attribute SystemAttributeByName(const char *attname,
|
2001-10-25 07:50:21 +02:00
|
|
|
bool relhasoids);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* HEAP_H */
|