Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
tablecmds.h108 linesDownload Raw Back to commands
1/*-------------------------------------------------------------------------2 *3 * tablecmds.h4 *	  prototypes for tablecmds.c.5 *6 *7 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group8 * Portions Copyright (c) 1994, Regents of the University of California9 *10 * src/include/commands/tablecmds.h11 *12 *-------------------------------------------------------------------------13 */14#ifndef TABLECMDS_H15#define TABLECMDS_H16 17#include "access/htup.h"18#include "catalog/dependency.h"19#include "catalog/objectaddress.h"20#include "nodes/parsenodes.h"21#include "storage/lock.h"22#include "utils/relcache.h"23 24struct AlterTableUtilityContext;	/* avoid including tcop/utility.h here */25 26 27extern ObjectAddress DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,28									ObjectAddress *typaddress, const char *queryString);29 30extern void RemoveRelations(DropStmt *drop);31 32extern Oid	AlterTableLookupRelation(AlterTableStmt *stmt, LOCKMODE lockmode);33 34extern void AlterTable(AlterTableStmt *stmt, LOCKMODE lockmode,35					   struct AlterTableUtilityContext *context);36 37extern LOCKMODE AlterTableGetLockLevel(List *cmds);38 39extern void ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lockmode);40 41extern void AlterTableInternal(Oid relid, List *cmds, bool recurse);42 43extern Oid	AlterTableMoveAll(AlterTableMoveAllStmt *stmt);44 45extern ObjectAddress AlterTableNamespace(AlterObjectSchemaStmt *stmt,46										 Oid *oldschema);47 48extern void AlterTableNamespaceInternal(Relation rel, Oid oldNspOid,49										Oid nspOid, ObjectAddresses *objsMoved);50 51extern void AlterRelationNamespaceInternal(Relation classRel, Oid relOid,52										   Oid oldNspOid, Oid newNspOid,53										   bool hasDependEntry,54										   ObjectAddresses *objsMoved);55 56extern void CheckTableNotInUse(Relation rel, const char *stmt);57 58extern void ExecuteTruncate(TruncateStmt *stmt);59extern void ExecuteTruncateGuts(List *explicit_rels,60								List *relids,61								List *relids_logged,62								DropBehavior behavior,63								bool restart_seqs,64								bool run_as_table_owner);65 66extern void SetRelationHasSubclass(Oid relationId, bool relhassubclass);67 68extern bool CheckRelationTableSpaceMove(Relation rel, Oid newTableSpaceId);69extern void SetRelationTableSpace(Relation rel, Oid newTableSpaceId,70								  RelFileNumber newRelFilenumber);71 72extern ObjectAddress renameatt(RenameStmt *stmt);73 74extern ObjectAddress RenameConstraint(RenameStmt *stmt);75 76extern ObjectAddress RenameRelation(RenameStmt *stmt);77 78extern void RenameRelationInternal(Oid myrelid,79								   const char *newrelname, bool is_internal,80								   bool is_index);81 82extern void ResetRelRewrite(Oid myrelid);83 84extern void find_composite_type_dependencies(Oid typeOid,85											 Relation origRelation,86											 const char *origTypeName);87 88extern void check_of_type(HeapTuple typetuple);89 90extern void register_on_commit_action(Oid relid, OnCommitAction action);91extern void remove_on_commit_action(Oid relid);92 93extern void PreCommit_on_commit_actions(void);94extern void AtEOXact_on_commit_actions(bool isCommit);95extern void AtEOSubXact_on_commit_actions(bool isCommit,96										  SubTransactionId mySubid,97										  SubTransactionId parentSubid);98 99extern void RangeVarCallbackOwnsTable(const RangeVar *relation,100									  Oid relId, Oid oldRelId, void *arg);101 102extern void RangeVarCallbackOwnsRelation(const RangeVar *relation,103										 Oid relId, Oid oldRelId, void *arg);104extern bool PartConstraintImpliedByRelConstraint(Relation scanrel,105												 List *partConstraint);106 107#endif							/* TABLECMDS_H */108 
codekingpro/portable-devtools · Team Ai