Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TABLECMDS_H
00015 #define TABLECMDS_H
00016
00017 #include "access/htup.h"
00018 #include "catalog/dependency.h"
00019 #include "nodes/parsenodes.h"
00020 #include "storage/lock.h"
00021 #include "utils/relcache.h"
00022
00023
00024 extern Oid DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId);
00025
00026 extern void RemoveRelations(DropStmt *drop);
00027
00028 extern Oid AlterTableLookupRelation(AlterTableStmt *stmt, LOCKMODE lockmode);
00029
00030 extern void AlterTable(Oid relid, LOCKMODE lockmode, AlterTableStmt *stmt);
00031
00032 extern LOCKMODE AlterTableGetLockLevel(List *cmds);
00033
00034 extern void ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lockmode);
00035
00036 extern void AlterTableInternal(Oid relid, List *cmds, bool recurse);
00037
00038 extern Oid AlterTableNamespace(AlterObjectSchemaStmt *stmt);
00039
00040 extern void AlterTableNamespaceInternal(Relation rel, Oid oldNspOid,
00041 Oid nspOid, ObjectAddresses *objsMoved);
00042
00043 extern void AlterRelationNamespaceInternal(Relation classRel, Oid relOid,
00044 Oid oldNspOid, Oid newNspOid,
00045 bool hasDependEntry,
00046 ObjectAddresses *objsMoved);
00047
00048 extern void CheckTableNotInUse(Relation rel, const char *stmt);
00049
00050 extern void ExecuteTruncate(TruncateStmt *stmt);
00051
00052 extern void SetRelationHasSubclass(Oid relationId, bool relhassubclass);
00053
00054 extern Oid renameatt(RenameStmt *stmt);
00055
00056 extern Oid RenameConstraint(RenameStmt *stmt);
00057
00058 extern Oid RenameRelation(RenameStmt *stmt);
00059
00060 extern void RenameRelationInternal(Oid myrelid,
00061 const char *newrelname, bool is_internal);
00062
00063 extern void find_composite_type_dependencies(Oid typeOid,
00064 Relation origRelation,
00065 const char *origTypeName);
00066
00067 extern void check_of_type(HeapTuple typetuple);
00068
00069 extern void register_on_commit_action(Oid relid, OnCommitAction action);
00070 extern void remove_on_commit_action(Oid relid);
00071
00072 extern void PreCommit_on_commit_actions(void);
00073 extern void AtEOXact_on_commit_actions(bool isCommit);
00074 extern void AtEOSubXact_on_commit_actions(bool isCommit,
00075 SubTransactionId mySubid,
00076 SubTransactionId parentSubid);
00077
00078 extern void RangeVarCallbackOwnsTable(const RangeVar *relation,
00079 Oid relId, Oid oldRelId, void *arg);
00080
00081 #endif