2002-04-15 07:22:04 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* tablecmds.h
|
|
|
|
* prototypes for tablecmds.c.
|
|
|
|
*
|
|
|
|
*
|
2007-01-05 23:20:05 +01:00
|
|
|
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
2002-04-15 07:22:04 +02:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
2007-07-03 03:30:37 +02:00
|
|
|
* $PostgreSQL: pgsql/src/include/commands/tablecmds.h,v 1.34 2007/07/03 01:30:37 neilc Exp $
|
2002-04-15 07:22:04 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef TABLECMDS_H
|
|
|
|
#define TABLECMDS_H
|
|
|
|
|
|
|
|
#include "nodes/parsenodes.h"
|
2005-08-01 06:03:59 +02:00
|
|
|
#include "utils/rel.h"
|
2002-04-15 07:22:04 +02:00
|
|
|
|
|
|
|
|
2004-05-05 06:48:48 +02:00
|
|
|
extern Oid DefineRelation(CreateStmt *stmt, char relkind);
|
2002-04-15 07:22:04 +02:00
|
|
|
|
2004-05-05 06:48:48 +02:00
|
|
|
extern void RemoveRelation(const RangeVar *relation, DropBehavior behavior);
|
2002-04-15 07:22:04 +02:00
|
|
|
|
2004-05-05 06:48:48 +02:00
|
|
|
extern void AlterTable(AlterTableStmt *stmt);
|
2002-04-15 07:22:04 +02:00
|
|
|
|
2005-11-21 13:49:33 +01:00
|
|
|
extern void ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing);
|
|
|
|
|
2004-05-05 06:48:48 +02:00
|
|
|
extern void AlterTableInternal(Oid relid, List *cmds, bool recurse);
|
2003-03-20 19:52:48 +01:00
|
|
|
|
2005-08-01 06:03:59 +02:00
|
|
|
extern void AlterTableNamespace(RangeVar *relation, const char *newschema);
|
|
|
|
|
|
|
|
extern void AlterRelationNamespaceInternal(Relation classRel, Oid relOid,
|
2005-10-15 04:49:52 +02:00
|
|
|
Oid oldNspOid, Oid newNspOid,
|
|
|
|
bool hasDependEntry);
|
2005-08-01 06:03:59 +02:00
|
|
|
|
2006-03-03 04:30:54 +01:00
|
|
|
extern void ExecuteTruncate(TruncateStmt *stmt);
|
2002-04-15 07:22:04 +02:00
|
|
|
|
2002-08-30 21:23:20 +02:00
|
|
|
extern void renameatt(Oid myrelid,
|
2002-04-15 07:22:04 +02:00
|
|
|
const char *oldattname,
|
|
|
|
const char *newattname,
|
2002-08-30 21:23:20 +02:00
|
|
|
bool recurse,
|
|
|
|
bool recursing);
|
2002-04-15 07:22:04 +02:00
|
|
|
|
2002-08-30 21:23:20 +02:00
|
|
|
extern void renamerel(Oid myrelid,
|
2007-07-03 03:30:37 +02:00
|
|
|
const char *newrelname,
|
|
|
|
ObjectType reltype);
|
2002-04-15 07:22:04 +02:00
|
|
|
|
2007-05-11 22:17:15 +02:00
|
|
|
extern void find_composite_type_dependencies(Oid typeOid,
|
|
|
|
const char *origTblName,
|
|
|
|
const char *origTypeName);
|
|
|
|
|
2006-10-04 02:30:14 +02:00
|
|
|
extern AttrNumber *varattnos_map(TupleDesc old, TupleDesc new);
|
|
|
|
extern AttrNumber *varattnos_map_schema(TupleDesc old, List *schema);
|
2006-06-27 05:43:20 +02:00
|
|
|
extern void change_varattnos_of_a_node(Node *node, const AttrNumber *newattno);
|
|
|
|
|
2002-11-11 23:19:25 +01:00
|
|
|
extern void register_on_commit_action(Oid relid, OnCommitAction action);
|
|
|
|
extern void remove_on_commit_action(Oid relid);
|
2002-11-10 00:56:39 +01:00
|
|
|
|
2002-11-11 23:19:25 +01:00
|
|
|
extern void PreCommit_on_commit_actions(void);
|
2004-09-16 18:58:44 +02:00
|
|
|
extern void AtEOXact_on_commit_actions(bool isCommit);
|
2004-07-01 02:52:04 +02:00
|
|
|
extern void AtEOSubXact_on_commit_actions(bool isCommit,
|
2005-10-15 04:49:52 +02:00
|
|
|
SubTransactionId mySubid,
|
|
|
|
SubTransactionId parentSubid);
|
2002-11-10 00:56:39 +01:00
|
|
|
|
2002-04-15 07:22:04 +02:00
|
|
|
#endif /* TABLECMDS_H */
|