2002-04-15 01:22:04 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* tablecmds.h
|
|
|
|
|
* prototypes for tablecmds.c.
|
|
|
|
|
*
|
|
|
|
|
*
|
2011-01-01 13:18:15 -05:00
|
|
|
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
|
2002-04-15 01:22:04 -04:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
|
*
|
2010-09-20 16:08:53 -04:00
|
|
|
* src/include/commands/tablecmds.h
|
2002-04-15 01:22:04 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
#ifndef TABLECMDS_H
|
|
|
|
|
#define TABLECMDS_H
|
|
|
|
|
|
|
|
|
|
#include "nodes/parsenodes.h"
|
2010-07-28 01:22:24 -04:00
|
|
|
#include "storage/lock.h"
|
2008-06-18 20:46:06 -04:00
|
|
|
#include "utils/relcache.h"
|
2002-04-15 01:22:04 -04:00
|
|
|
|
|
|
|
|
|
2010-08-18 14:35:21 -04:00
|
|
|
extern Oid DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId);
|
2002-04-15 01:22:04 -04:00
|
|
|
|
2008-06-14 14:04:34 -04:00
|
|
|
extern void RemoveRelations(DropStmt *drop);
|
2002-04-15 01:22:04 -04:00
|
|
|
|
2004-05-05 00:48:48 -04:00
|
|
|
extern void AlterTable(AlterTableStmt *stmt);
|
2002-04-15 01:22:04 -04:00
|
|
|
|
2010-07-28 01:22:24 -04:00
|
|
|
extern LOCKMODE AlterTableGetLockLevel(List *cmds);
|
|
|
|
|
|
|
|
|
|
extern void ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lockmode);
|
2005-11-21 07:49:33 -05:00
|
|
|
|
2004-05-05 00:48:48 -04:00
|
|
|
extern void AlterTableInternal(Oid relid, List *cmds, bool recurse);
|
2003-03-20 13:52:48 -05:00
|
|
|
|
2008-06-14 21:25:54 -04:00
|
|
|
extern void AlterTableNamespace(RangeVar *relation, const char *newschema,
|
2010-07-28 01:22:24 -04:00
|
|
|
ObjectType stmttype, LOCKMODE lockmode);
|
2005-08-01 00:03:59 -04:00
|
|
|
|
|
|
|
|
extern void AlterRelationNamespaceInternal(Relation classRel, Oid relOid,
|
2005-10-14 22:49:52 -04:00
|
|
|
Oid oldNspOid, Oid newNspOid,
|
|
|
|
|
bool hasDependEntry);
|
2005-08-01 00:03:59 -04:00
|
|
|
|
2008-01-30 14:46:48 -05:00
|
|
|
extern void CheckTableNotInUse(Relation rel, const char *stmt);
|
|
|
|
|
|
2006-03-02 22:30:54 -05:00
|
|
|
extern void ExecuteTruncate(TruncateStmt *stmt);
|
2002-04-15 01:22:04 -04:00
|
|
|
|
2010-11-23 15:50:17 -05:00
|
|
|
extern void renameatt(Oid myrelid, RenameStmt *stmt);
|
2002-04-15 01:22:04 -04:00
|
|
|
|
2008-03-19 14:38:30 -04:00
|
|
|
extern void RenameRelation(Oid myrelid,
|
2009-06-11 10:49:15 -04:00
|
|
|
const char *newrelname,
|
|
|
|
|
ObjectType reltype);
|
2002-04-15 01:22:04 -04:00
|
|
|
|
2008-03-19 14:38:30 -04:00
|
|
|
extern void RenameRelationInternal(Oid myrelid,
|
2009-06-11 10:49:15 -04:00
|
|
|
const char *newrelname,
|
|
|
|
|
Oid namespaceId);
|
2008-03-19 14:38:30 -04:00
|
|
|
|
2007-05-11 16:17:15 -04:00
|
|
|
extern void find_composite_type_dependencies(Oid typeOid,
|
2011-02-06 00:26:27 -05:00
|
|
|
char origRelkind, const char *origRelname);
|
2007-05-11 16:17:15 -04:00
|
|
|
|
2009-07-16 02:33:46 -04:00
|
|
|
extern AttrNumber *varattnos_map(TupleDesc olddesc, TupleDesc newdesc);
|
2006-10-03 20:30:14 -04:00
|
|
|
extern AttrNumber *varattnos_map_schema(TupleDesc old, List *schema);
|
2006-06-26 23:43:20 -04:00
|
|
|
extern void change_varattnos_of_a_node(Node *node, const AttrNumber *newattno);
|
|
|
|
|
|
2002-11-11 17:19:25 -05:00
|
|
|
extern void register_on_commit_action(Oid relid, OnCommitAction action);
|
|
|
|
|
extern void remove_on_commit_action(Oid relid);
|
2002-11-09 18:56:39 -05:00
|
|
|
|
2002-11-11 17:19:25 -05:00
|
|
|
extern void PreCommit_on_commit_actions(void);
|
2004-09-16 12:58:44 -04:00
|
|
|
extern void AtEOXact_on_commit_actions(bool isCommit);
|
2004-06-30 20:52:04 -04:00
|
|
|
extern void AtEOSubXact_on_commit_actions(bool isCommit,
|
2005-10-14 22:49:52 -04:00
|
|
|
SubTransactionId mySubid,
|
|
|
|
|
SubTransactionId parentSubid);
|
2002-11-09 18:56:39 -05:00
|
|
|
|
2002-04-15 01:22:04 -04:00
|
|
|
#endif /* TABLECMDS_H */
|