|
|
@ -22,7 +22,6 @@
|
|
|
|
#include "tcop/utility.h"
|
|
|
|
#include "tcop/utility.h"
|
|
|
|
#include "utils/acl.h"
|
|
|
|
#include "utils/acl.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern bool AddAllLocalTablesToMetadata;
|
|
|
|
extern bool AddAllLocalTablesToMetadata;
|
|
|
|
extern bool EnableSchemaBasedSharding;
|
|
|
|
extern bool EnableSchemaBasedSharding;
|
|
|
|
|
|
|
|
|
|
|
@ -58,7 +57,6 @@ typedef enum DistOpsOperationType
|
|
|
|
DIST_OPS_DROP,
|
|
|
|
DIST_OPS_DROP,
|
|
|
|
} DistOpsOperationType;
|
|
|
|
} DistOpsOperationType;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* DistributeObjectOps specifies handlers for node/object type pairs.
|
|
|
|
* DistributeObjectOps specifies handlers for node/object type pairs.
|
|
|
|
* Instances of this type should all be declared in deparse.c.
|
|
|
|
* Instances of this type should all be declared in deparse.c.
|
|
|
@ -79,11 +77,11 @@ typedef enum DistOpsOperationType
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
typedef struct DistributeObjectOps
|
|
|
|
typedef struct DistributeObjectOps
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char * (*deparse)(Node *);
|
|
|
|
char *(*deparse)(Node *);
|
|
|
|
void (*qualify)(Node *);
|
|
|
|
void (*qualify)(Node *);
|
|
|
|
List * (*preprocess)(Node *, const char *, ProcessUtilityContext);
|
|
|
|
List *(*preprocess)(Node *, const char *, ProcessUtilityContext);
|
|
|
|
List * (*postprocess)(Node *, const char *);
|
|
|
|
List *(*postprocess)(Node *, const char *);
|
|
|
|
List * (*address)(Node *, bool, bool);
|
|
|
|
List *(*address)(Node *, bool, bool);
|
|
|
|
bool markDistributed;
|
|
|
|
bool markDistributed;
|
|
|
|
|
|
|
|
|
|
|
|
/* fields used by common implementations, omitted for specialized implementations */
|
|
|
|
/* fields used by common implementations, omitted for specialized implementations */
|
|
|
@ -101,7 +99,7 @@ typedef struct DistributeObjectOps
|
|
|
|
|
|
|
|
|
|
|
|
#define CITUS_TRUNCATE_TRIGGER_NAME "citus_truncate_trigger"
|
|
|
|
#define CITUS_TRUNCATE_TRIGGER_NAME "citus_truncate_trigger"
|
|
|
|
|
|
|
|
|
|
|
|
const DistributeObjectOps * GetDistributeObjectOps(Node *node);
|
|
|
|
const DistributeObjectOps *GetDistributeObjectOps(Node *node);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Flags that can be passed to GetForeignKeyOids to indicate
|
|
|
|
* Flags that can be passed to GetForeignKeyOids to indicate
|
|
|
@ -140,7 +138,6 @@ typedef enum ExtractForeignKeyConstraintsMode
|
|
|
|
INCLUDE_SINGLE_SHARD_TABLES
|
|
|
|
INCLUDE_SINGLE_SHARD_TABLES
|
|
|
|
} ExtractForeignKeyConstraintMode;
|
|
|
|
} ExtractForeignKeyConstraintMode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Flags that can be passed to GetForeignKeyIdsForColumn to
|
|
|
|
* Flags that can be passed to GetForeignKeyIdsForColumn to
|
|
|
|
* indicate whether relationId argument should match:
|
|
|
|
* indicate whether relationId argument should match:
|
|
|
@ -159,7 +156,6 @@ typedef enum SearchForeignKeyColumnFlags
|
|
|
|
/* callers can also pass union of above flags */
|
|
|
|
/* callers can also pass union of above flags */
|
|
|
|
} SearchForeignKeyColumnFlags;
|
|
|
|
} SearchForeignKeyColumnFlags;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum TenantOperation
|
|
|
|
typedef enum TenantOperation
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TENANT_UNDISTRIBUTE_TABLE = 0,
|
|
|
|
TENANT_UNDISTRIBUTE_TABLE = 0,
|
|
|
@ -176,112 +172,100 @@ extern const char *TenantOperationNames[TOTAL_TENANT_OPERATION];
|
|
|
|
extern void SaveBeginCommandProperties(TransactionStmt *transactionStmt);
|
|
|
|
extern void SaveBeginCommandProperties(TransactionStmt *transactionStmt);
|
|
|
|
|
|
|
|
|
|
|
|
/* cluster.c - forward declarations */
|
|
|
|
/* cluster.c - forward declarations */
|
|
|
|
extern List * PreprocessClusterStmt(Node *node, const char *clusterCommand,
|
|
|
|
extern List *PreprocessClusterStmt(Node *node, const char *clusterCommand,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
/* common.c - forward declarations*/
|
|
|
|
/* common.c - forward declarations*/
|
|
|
|
extern List * PostprocessCreateDistributedObjectFromCatalogStmt(Node *stmt,
|
|
|
|
extern List *PostprocessCreateDistributedObjectFromCatalogStmt(Node *stmt,
|
|
|
|
const char *queryString);
|
|
|
|
const char *queryString);
|
|
|
|
extern List * PreprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * PostprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString);
|
|
|
|
extern List *PostprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString);
|
|
|
|
extern List * PreprocessDropDistributedObjectStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessDropDistributedObjectStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * DropTextSearchConfigObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *DropTextSearchConfigObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *DropTextSearchDictObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * DropTextSearchDictObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* index.c */
|
|
|
|
/* index.c */
|
|
|
|
typedef void (*PGIndexProcessor)(Form_pg_index, List **, int);
|
|
|
|
typedef void (*PGIndexProcessor)(Form_pg_index, List **, int);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* call.c */
|
|
|
|
/* call.c */
|
|
|
|
extern bool CallDistributedProcedureRemotely(CallStmt *callStmt, DestReceiver *dest);
|
|
|
|
extern bool CallDistributedProcedureRemotely(CallStmt *callStmt, DestReceiver *dest);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* collation.c - forward declarations */
|
|
|
|
/* collation.c - forward declarations */
|
|
|
|
extern char * CreateCollationDDL(Oid collationId);
|
|
|
|
extern char *CreateCollationDDL(Oid collationId);
|
|
|
|
extern List * CreateCollationDDLsIdempotent(Oid collationId);
|
|
|
|
extern List *CreateCollationDDLsIdempotent(Oid collationId);
|
|
|
|
extern List * AlterCollationOwnerObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List *AlterCollationOwnerObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *RenameCollationStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * RenameCollationStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List *AlterCollationSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * AlterCollationSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern char * GenerateBackupNameForCollationCollision(const ObjectAddress *address);
|
|
|
|
extern char *GenerateBackupNameForCollationCollision(const ObjectAddress *address);
|
|
|
|
extern List * DefineCollationStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List *DefineCollationStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* database.c - forward declarations */
|
|
|
|
/* database.c - forward declarations */
|
|
|
|
extern List * AlterDatabaseOwnerObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *AlterDatabaseOwnerObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *DatabaseOwnerDDLCommands(const ObjectAddress *address);
|
|
|
|
extern List * DatabaseOwnerDDLCommands(const ObjectAddress *address);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern List * PreprocessGrantOnDatabaseStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessGrantOnDatabaseStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
extern List * PreprocessAlterDatabaseStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterDatabaseStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
extern List * PreprocessAlterDatabaseRefreshCollStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterDatabaseRefreshCollStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern List *PreprocessAlterDatabaseSetStmt(Node *node, const char *queryString,
|
|
|
|
extern List * PreprocessAlterDatabaseSetStmt(Node *node, const char *queryString,
|
|
|
|
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern List *PostprocessCreateDatabaseStmt(Node *node, const char *queryString);
|
|
|
|
|
|
|
|
extern List *PreprocessDropDatabaseStmt(Node *node, const char *queryString,
|
|
|
|
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
/* domain.c - forward declarations */
|
|
|
|
/* domain.c - forward declarations */
|
|
|
|
extern List * CreateDomainStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *CreateDomainStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *AlterDomainStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterDomainStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *DomainRenameConstraintStmtObjectAddress(Node *node,
|
|
|
|
isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * DomainRenameConstraintStmtObjectAddress(Node *node,
|
|
|
|
extern List *AlterDomainOwnerStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool
|
|
|
|
extern List *RenameDomainStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern CreateDomainStmt *RecreateDomainStmt(Oid domainOid);
|
|
|
|
extern List * AlterDomainOwnerStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * RenameDomainStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern CreateDomainStmt * RecreateDomainStmt(Oid domainOid);
|
|
|
|
|
|
|
|
extern Oid get_constraint_typid(Oid conoid);
|
|
|
|
extern Oid get_constraint_typid(Oid conoid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* extension.c - forward declarations */
|
|
|
|
/* extension.c - forward declarations */
|
|
|
|
extern bool IsDropCitusExtensionStmt(Node *parsetree);
|
|
|
|
extern bool IsDropCitusExtensionStmt(Node *parsetree);
|
|
|
|
extern List * GetDependentFDWsToExtension(Oid extensionId);
|
|
|
|
extern List *GetDependentFDWsToExtension(Oid extensionId);
|
|
|
|
extern bool IsCreateAlterExtensionUpdateCitusStmt(Node *parsetree);
|
|
|
|
extern bool IsCreateAlterExtensionUpdateCitusStmt(Node *parsetree);
|
|
|
|
extern void PreprocessCreateExtensionStmtForCitusColumnar(Node *parsetree);
|
|
|
|
extern void PreprocessCreateExtensionStmtForCitusColumnar(Node *parsetree);
|
|
|
|
extern void PreprocessAlterExtensionCitusStmtForCitusColumnar(Node *parsetree);
|
|
|
|
extern void PreprocessAlterExtensionCitusStmtForCitusColumnar(Node *parsetree);
|
|
|
|
extern void PostprocessAlterExtensionCitusStmtForCitusColumnar(Node *parsetree);
|
|
|
|
extern void PostprocessAlterExtensionCitusStmtForCitusColumnar(Node *parsetree);
|
|
|
|
extern bool ShouldMarkRelationDistributed(Oid relationId);
|
|
|
|
extern bool ShouldMarkRelationDistributed(Oid relationId);
|
|
|
|
extern void ErrorIfUnstableCreateOrAlterExtensionStmt(Node *parsetree);
|
|
|
|
extern void ErrorIfUnstableCreateOrAlterExtensionStmt(Node *parsetree);
|
|
|
|
extern List * PostprocessCreateExtensionStmt(Node *stmt, const char *queryString);
|
|
|
|
extern List *PostprocessCreateExtensionStmt(Node *stmt, const char *queryString);
|
|
|
|
extern List * PreprocessDropExtensionStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessDropExtensionStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessAlterExtensionSchemaStmt(Node *stmt,
|
|
|
|
extern List *PreprocessAlterExtensionSchemaStmt(Node *stmt,
|
|
|
|
const char *queryString,
|
|
|
|
const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * PostprocessAlterExtensionSchemaStmt(Node *stmt,
|
|
|
|
extern List *PostprocessAlterExtensionSchemaStmt(Node *stmt,
|
|
|
|
const char *queryString);
|
|
|
|
const char *queryString);
|
|
|
|
extern List * PreprocessAlterExtensionUpdateStmt(Node *stmt,
|
|
|
|
extern List *PreprocessAlterExtensionUpdateStmt(Node *stmt,
|
|
|
|
const char *queryString,
|
|
|
|
const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern void PostprocessAlterExtensionCitusUpdateStmt(Node *node);
|
|
|
|
extern void PostprocessAlterExtensionCitusUpdateStmt(Node *node);
|
|
|
|
extern List * PreprocessAlterExtensionContentsStmt(Node *node,
|
|
|
|
extern List *PreprocessAlterExtensionContentsStmt(Node *node,
|
|
|
|
const char *queryString,
|
|
|
|
const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * CreateExtensionDDLCommand(const ObjectAddress *extensionAddress);
|
|
|
|
extern List *CreateExtensionDDLCommand(const ObjectAddress *extensionAddress);
|
|
|
|
extern List * AlterExtensionSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *AlterExtensionSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterExtensionUpdateStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *AlterExtensionUpdateStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern void CreateExtensionWithVersion(char *extname, char *extVersion);
|
|
|
|
extern void CreateExtensionWithVersion(char *extname, char *extVersion);
|
|
|
|
extern void AlterExtensionUpdateStmt(char *extname, char *extVersion);
|
|
|
|
extern void AlterExtensionUpdateStmt(char *extname, char *extVersion);
|
|
|
@ -302,20 +286,20 @@ extern bool ColumnReferencedByAnyForeignKey(char *columnName, Oid relationId);
|
|
|
|
extern bool ColumnAppearsInForeignKey(char *columnName, Oid relationId);
|
|
|
|
extern bool ColumnAppearsInForeignKey(char *columnName, Oid relationId);
|
|
|
|
extern bool ColumnAppearsInForeignKeyToReferenceTable(char *columnName, Oid
|
|
|
|
extern bool ColumnAppearsInForeignKeyToReferenceTable(char *columnName, Oid
|
|
|
|
relationId);
|
|
|
|
relationId);
|
|
|
|
extern List * GetReferencingForeignConstaintCommands(Oid relationOid);
|
|
|
|
extern List *GetReferencingForeignConstaintCommands(Oid relationOid);
|
|
|
|
extern List * GetForeignConstraintToReferenceTablesCommands(Oid relationId);
|
|
|
|
extern List *GetForeignConstraintToReferenceTablesCommands(Oid relationId);
|
|
|
|
extern List * GetForeignConstraintFromOtherReferenceTablesCommands(Oid relationId);
|
|
|
|
extern List *GetForeignConstraintFromOtherReferenceTablesCommands(Oid relationId);
|
|
|
|
extern List * GetForeignConstraintToDistributedTablesCommands(Oid relationId);
|
|
|
|
extern List *GetForeignConstraintToDistributedTablesCommands(Oid relationId);
|
|
|
|
extern List * GetForeignConstraintFromDistributedTablesCommands(Oid relationId);
|
|
|
|
extern List *GetForeignConstraintFromDistributedTablesCommands(Oid relationId);
|
|
|
|
extern List * GetForeignConstraintCommandsInternal(Oid relationId, int flags);
|
|
|
|
extern List *GetForeignConstraintCommandsInternal(Oid relationId, int flags);
|
|
|
|
extern Oid DropFKeysAndUndistributeTable(Oid relationId);
|
|
|
|
extern Oid DropFKeysAndUndistributeTable(Oid relationId);
|
|
|
|
extern void DropFKeysRelationInvolvedWithTableType(Oid relationId, int tableTypeFlag);
|
|
|
|
extern void DropFKeysRelationInvolvedWithTableType(Oid relationId, int tableTypeFlag);
|
|
|
|
extern List * GetFKeyCreationCommandsRelationInvolvedWithTableType(Oid relationId,
|
|
|
|
extern List *GetFKeyCreationCommandsRelationInvolvedWithTableType(Oid relationId,
|
|
|
|
int tableTypeFlag);
|
|
|
|
int tableTypeFlag);
|
|
|
|
extern bool AnyForeignKeyDependsOnIndex(Oid indexId);
|
|
|
|
extern bool AnyForeignKeyDependsOnIndex(Oid indexId);
|
|
|
|
extern bool HasForeignKeyWithLocalTable(Oid relationId);
|
|
|
|
extern bool HasForeignKeyWithLocalTable(Oid relationId);
|
|
|
|
extern bool HasForeignKeyToReferenceTable(Oid relationOid);
|
|
|
|
extern bool HasForeignKeyToReferenceTable(Oid relationOid);
|
|
|
|
extern List * GetForeignKeysFromLocalTables(Oid relationId);
|
|
|
|
extern List *GetForeignKeysFromLocalTables(Oid relationId);
|
|
|
|
extern bool TableReferenced(Oid relationOid);
|
|
|
|
extern bool TableReferenced(Oid relationOid);
|
|
|
|
extern bool TableReferencing(Oid relationOid);
|
|
|
|
extern bool TableReferencing(Oid relationOid);
|
|
|
|
extern bool ConstraintIsAUniquenessConstraint(char *inputConstaintName, Oid relationId);
|
|
|
|
extern bool ConstraintIsAUniquenessConstraint(char *inputConstaintName, Oid relationId);
|
|
|
@ -324,296 +308,268 @@ extern bool ConstraintWithNameIsOfType(char *inputConstaintName, Oid relationId,
|
|
|
|
char targetConstraintType);
|
|
|
|
char targetConstraintType);
|
|
|
|
extern bool ConstraintWithIdIsOfType(Oid constraintId, char targetConstraintType);
|
|
|
|
extern bool ConstraintWithIdIsOfType(Oid constraintId, char targetConstraintType);
|
|
|
|
extern bool TableHasExternalForeignKeys(Oid relationId);
|
|
|
|
extern bool TableHasExternalForeignKeys(Oid relationId);
|
|
|
|
extern List * GetForeignKeyOids(Oid relationId, int flags);
|
|
|
|
extern List *GetForeignKeyOids(Oid relationId, int flags);
|
|
|
|
extern Oid GetReferencedTableId(Oid foreignKeyId);
|
|
|
|
extern Oid GetReferencedTableId(Oid foreignKeyId);
|
|
|
|
extern Oid GetReferencingTableId(Oid foreignKeyId);
|
|
|
|
extern Oid GetReferencingTableId(Oid foreignKeyId);
|
|
|
|
extern bool RelationInvolvedInAnyNonInheritedForeignKeys(Oid relationId);
|
|
|
|
extern bool RelationInvolvedInAnyNonInheritedForeignKeys(Oid relationId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* foreign_data_wrapper.c - forward declarations */
|
|
|
|
/* foreign_data_wrapper.c - forward declarations */
|
|
|
|
extern List * PreprocessGrantOnFDWStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessGrantOnFDWStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern Acl * GetPrivilegesForFDW(Oid FDWOid);
|
|
|
|
extern Acl *GetPrivilegesForFDW(Oid FDWOid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* foreign_server.c - forward declarations */
|
|
|
|
/* foreign_server.c - forward declarations */
|
|
|
|
extern List * PreprocessGrantOnForeignServerStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessGrantOnForeignServerStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * CreateForeignServerStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *CreateForeignServerStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *AlterForeignServerStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterForeignServerStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *RenameForeignServerStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *AlterForeignServerOwnerStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * RenameForeignServerStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *GetForeignServerCreateDDLCommand(Oid serverId);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * AlterForeignServerOwnerStmtObjectAddress(Node *node, bool
|
|
|
|
|
|
|
|
missing_ok, bool isPostprocess);
|
|
|
|
|
|
|
|
extern List * GetForeignServerCreateDDLCommand(Oid serverId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* foreign_table.c - forward declarations */
|
|
|
|
/* foreign_table.c - forward declarations */
|
|
|
|
extern List * PreprocessAlterForeignTableSchemaStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterForeignTableSchemaStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* function.c - forward declarations */
|
|
|
|
/* function.c - forward declarations */
|
|
|
|
extern List * PreprocessCreateFunctionStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessCreateFunctionStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessCreateFunctionStmt(Node *stmt,
|
|
|
|
extern List *PostprocessCreateFunctionStmt(Node *stmt,
|
|
|
|
const char *queryString);
|
|
|
|
const char *queryString);
|
|
|
|
extern List * CreateFunctionStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *CreateFunctionStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * DefineAggregateStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *DefineAggregateStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * PreprocessAlterFunctionStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessAlterFunctionStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * AlterFunctionStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *AlterFunctionStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * RenameFunctionStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *RenameFunctionStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterFunctionOwnerObjectAddress(Node *stmt,
|
|
|
|
extern List *AlterFunctionOwnerObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterFunctionSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *AlterFunctionSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * PreprocessAlterFunctionDependsStmt(Node *stmt,
|
|
|
|
extern List *PreprocessAlterFunctionDependsStmt(Node *stmt,
|
|
|
|
const char *queryString,
|
|
|
|
const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * AlterFunctionDependsStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *AlterFunctionDependsStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * PreprocessGrantOnFunctionStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessGrantOnFunctionStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessGrantOnFunctionStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessGrantOnFunctionStmt(Node *node, const char *queryString);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* grant.c - forward declarations */
|
|
|
|
/* grant.c - forward declarations */
|
|
|
|
extern List * PreprocessGrantStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessGrantStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern void deparsePrivileges(StringInfo privsString, GrantStmt *grantStmt);
|
|
|
|
extern void deparsePrivileges(StringInfo privsString, GrantStmt *grantStmt);
|
|
|
|
extern void deparseGrantees(StringInfo granteesString, GrantStmt *grantStmt);
|
|
|
|
extern void deparseGrantees(StringInfo granteesString, GrantStmt *grantStmt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* index.c - forward declarations */
|
|
|
|
/* index.c - forward declarations */
|
|
|
|
extern bool IsIndexRenameStmt(RenameStmt *renameStmt);
|
|
|
|
extern bool IsIndexRenameStmt(RenameStmt *renameStmt);
|
|
|
|
extern List * PreprocessIndexStmt(Node *createIndexStatement,
|
|
|
|
extern List *PreprocessIndexStmt(Node *createIndexStatement,
|
|
|
|
const char *createIndexCommand,
|
|
|
|
const char *createIndexCommand,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern char * ChooseIndexName(const char *tabname, Oid namespaceId,
|
|
|
|
extern char *ChooseIndexName(const char *tabname, Oid namespaceId,
|
|
|
|
List *colnames, List *exclusionOpNames,
|
|
|
|
List *colnames, List *exclusionOpNames,
|
|
|
|
bool primary, bool isconstraint);
|
|
|
|
bool primary, bool isconstraint);
|
|
|
|
extern char * ChooseIndexNameAddition(List *colnames);
|
|
|
|
extern char *ChooseIndexNameAddition(List *colnames);
|
|
|
|
extern List * ChooseIndexColumnNames(List *indexElems);
|
|
|
|
extern List *ChooseIndexColumnNames(List *indexElems);
|
|
|
|
extern LOCKMODE GetCreateIndexRelationLockMode(IndexStmt *createIndexStatement);
|
|
|
|
extern LOCKMODE GetCreateIndexRelationLockMode(IndexStmt *createIndexStatement);
|
|
|
|
extern List * PreprocessReindexStmt(Node *ReindexStatement,
|
|
|
|
extern List *PreprocessReindexStmt(Node *ReindexStatement,
|
|
|
|
const char *ReindexCommand,
|
|
|
|
const char *ReindexCommand,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * ReindexStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List *ReindexStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * PreprocessDropIndexStmt(Node *dropIndexStatement,
|
|
|
|
extern List *PreprocessDropIndexStmt(Node *dropIndexStatement,
|
|
|
|
const char *dropIndexCommand,
|
|
|
|
const char *dropIndexCommand,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessIndexStmt(Node *node,
|
|
|
|
extern List *PostprocessIndexStmt(Node *node,
|
|
|
|
const char *queryString);
|
|
|
|
const char *queryString);
|
|
|
|
extern void ErrorIfUnsupportedAlterIndexStmt(AlterTableStmt *alterTableStatement);
|
|
|
|
extern void ErrorIfUnsupportedAlterIndexStmt(AlterTableStmt *alterTableStatement);
|
|
|
|
extern void MarkIndexValid(IndexStmt *indexStmt);
|
|
|
|
extern void MarkIndexValid(IndexStmt *indexStmt);
|
|
|
|
extern List * ExecuteFunctionOnEachTableIndex(Oid relationId, PGIndexProcessor
|
|
|
|
extern List *ExecuteFunctionOnEachTableIndex(Oid relationId, PGIndexProcessor pgIndexProcessor, int flags);
|
|
|
|
pgIndexProcessor, int flags);
|
|
|
|
|
|
|
|
extern bool IsReindexWithParam_compat(ReindexStmt *stmt, char *paramName);
|
|
|
|
extern bool IsReindexWithParam_compat(ReindexStmt *stmt, char *paramName);
|
|
|
|
|
|
|
|
|
|
|
|
/* objectaddress.c - forward declarations */
|
|
|
|
/* objectaddress.c - forward declarations */
|
|
|
|
extern List * CreateExtensionStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List *CreateExtensionStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* owned.c - forward declarations */
|
|
|
|
/* owned.c - forward declarations */
|
|
|
|
extern List * PreprocessDropOwnedStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessDropOwnedStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
/* policy.c - forward declarations */
|
|
|
|
/* policy.c - forward declarations */
|
|
|
|
extern List * CreatePolicyCommands(Oid relationId);
|
|
|
|
extern List *CreatePolicyCommands(Oid relationId);
|
|
|
|
extern void ErrorIfUnsupportedPolicy(Relation relation);
|
|
|
|
extern void ErrorIfUnsupportedPolicy(Relation relation);
|
|
|
|
extern void ErrorIfUnsupportedPolicyExpr(Node *expr);
|
|
|
|
extern void ErrorIfUnsupportedPolicyExpr(Node *expr);
|
|
|
|
extern List * PostprocessCreatePolicyStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessCreatePolicyStmt(Node *node, const char *queryString);
|
|
|
|
extern List * PreprocessAlterPolicyStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterPolicyStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessDropPolicyStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessDropPolicyStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern bool IsPolicyRenameStmt(RenameStmt *stmt);
|
|
|
|
extern bool IsPolicyRenameStmt(RenameStmt *stmt);
|
|
|
|
extern void CreatePolicyEventExtendNames(CreatePolicyStmt *stmt, const char *schemaName,
|
|
|
|
extern void CreatePolicyEventExtendNames(CreatePolicyStmt *stmt, const char *schemaName,
|
|
|
|
uint64 shardId);
|
|
|
|
uint64 shardId);
|
|
|
|
extern void AlterPolicyEventExtendNames(AlterPolicyStmt *stmt, const char *schemaName,
|
|
|
|
extern void AlterPolicyEventExtendNames(AlterPolicyStmt *stmt, const char *schemaName,
|
|
|
|
uint64 shardId);
|
|
|
|
uint64 shardId);
|
|
|
|
extern void RenamePolicyEventExtendNames(RenameStmt *stmt, const char *schemaName, uint64
|
|
|
|
extern void RenamePolicyEventExtendNames(RenameStmt *stmt, const char *schemaName, uint64 shardId);
|
|
|
|
shardId);
|
|
|
|
extern void DropPolicyEventExtendNames(DropStmt *stmt, const char *schemaName, uint64 shardId);
|
|
|
|
extern void DropPolicyEventExtendNames(DropStmt *stmt, const char *schemaName, uint64
|
|
|
|
|
|
|
|
shardId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern void AddRangeTableEntryToQueryCompat(ParseState *parseState, Relation relation);
|
|
|
|
extern void AddRangeTableEntryToQueryCompat(ParseState *parseState, Relation relation);
|
|
|
|
|
|
|
|
|
|
|
|
/* publication.c - forward declarations */
|
|
|
|
/* publication.c - forward declarations */
|
|
|
|
extern List * PostProcessCreatePublicationStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostProcessCreatePublicationStmt(Node *node, const char *queryString);
|
|
|
|
extern List * CreatePublicationDDLCommandsIdempotent(const ObjectAddress *address);
|
|
|
|
extern List *CreatePublicationDDLCommandsIdempotent(const ObjectAddress *address);
|
|
|
|
extern char * CreatePublicationDDLCommand(Oid publicationId);
|
|
|
|
extern char *CreatePublicationDDLCommand(Oid publicationId);
|
|
|
|
extern List * PreprocessAlterPublicationStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessAlterPublicationStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityCtx);
|
|
|
|
ProcessUtilityContext processUtilityCtx);
|
|
|
|
extern List * GetAlterPublicationDDLCommandsForTable(Oid relationId, bool isAdd);
|
|
|
|
extern List *GetAlterPublicationDDLCommandsForTable(Oid relationId, bool isAdd);
|
|
|
|
extern char * GetAlterPublicationTableDDLCommand(Oid publicationId, Oid relationId,
|
|
|
|
extern char *GetAlterPublicationTableDDLCommand(Oid publicationId, Oid relationId,
|
|
|
|
bool isAdd);
|
|
|
|
bool isAdd);
|
|
|
|
extern List * AlterPublicationOwnerStmtObjectAddress(Node *node, bool missingOk,
|
|
|
|
extern List *AlterPublicationOwnerStmtObjectAddress(Node *node, bool missingOk,
|
|
|
|
bool isPostProcess);
|
|
|
|
bool isPostProcess);
|
|
|
|
extern List * AlterPublicationStmtObjectAddress(Node *node, bool missingOk,
|
|
|
|
extern List *AlterPublicationStmtObjectAddress(Node *node, bool missingOk,
|
|
|
|
bool isPostProcess);
|
|
|
|
bool isPostProcess);
|
|
|
|
extern List * CreatePublicationStmtObjectAddress(Node *node, bool missingOk,
|
|
|
|
extern List *CreatePublicationStmtObjectAddress(Node *node, bool missingOk,
|
|
|
|
bool isPostProcess);
|
|
|
|
bool isPostProcess);
|
|
|
|
extern List * RenamePublicationStmtObjectAddress(Node *node, bool missingOk,
|
|
|
|
extern List *RenamePublicationStmtObjectAddress(Node *node, bool missingOk,
|
|
|
|
bool isPostProcess);
|
|
|
|
bool isPostProcess);
|
|
|
|
|
|
|
|
|
|
|
|
/* rename.c - forward declarations*/
|
|
|
|
/* rename.c - forward declarations*/
|
|
|
|
extern List * PreprocessRenameStmt(Node *renameStmt, const char *renameCommand,
|
|
|
|
extern List *PreprocessRenameStmt(Node *renameStmt, const char *renameCommand,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern void ErrorIfUnsupportedRenameStmt(RenameStmt *renameStmt);
|
|
|
|
extern void ErrorIfUnsupportedRenameStmt(RenameStmt *renameStmt);
|
|
|
|
extern List * PreprocessRenameAttributeStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessRenameAttributeStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* role.c - forward declarations*/
|
|
|
|
/* role.c - forward declarations*/
|
|
|
|
extern List * PostprocessAlterRoleStmt(Node *stmt, const char *queryString);
|
|
|
|
extern List *PostprocessAlterRoleStmt(Node *stmt, const char *queryString);
|
|
|
|
extern List * PreprocessAlterRoleSetStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessAlterRoleSetStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
extern List * PreprocessAlterRoleRenameStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List * PreprocessAlterRoleRenameStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
|
|
|
|
|
|
|
|
extern List * GenerateAlterRoleSetCommandForRole(Oid roleid);
|
|
|
|
extern List *GenerateAlterRoleSetCommandForRole(Oid roleid);
|
|
|
|
extern List * AlterRoleStmtObjectAddress(Node *node,
|
|
|
|
extern List *AlterRoleStmtObjectAddress(Node *node,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterRoleSetStmtObjectAddress(Node *node,
|
|
|
|
extern List *AlterRoleSetStmtObjectAddress(Node *node,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * PreprocessCreateRoleStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessCreateRoleStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessDropRoleStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessDropRoleStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessGrantRoleStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessGrantRoleStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessGrantRoleStmt(Node *stmt, const char *queryString);
|
|
|
|
extern List *PostprocessGrantRoleStmt(Node *stmt, const char *queryString);
|
|
|
|
extern List * GenerateCreateOrAlterRoleCommand(Oid roleOid);
|
|
|
|
extern List *GenerateCreateOrAlterRoleCommand(Oid roleOid);
|
|
|
|
extern List * CreateRoleStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List *CreateRoleStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern List * RenameRoleStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List * RenameRoleStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
|
|
|
|
extern void UnmarkRolesDistributed(List *roles);
|
|
|
|
extern void UnmarkRolesDistributed(List *roles);
|
|
|
|
extern List * FilterDistributedRoles(List *roles);
|
|
|
|
extern List *FilterDistributedRoles(List *roles);
|
|
|
|
|
|
|
|
|
|
|
|
/* schema.c - forward declarations */
|
|
|
|
/* schema.c - forward declarations */
|
|
|
|
extern List * PostprocessCreateSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessCreateSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern List * PreprocessDropSchemaStmt(Node *dropSchemaStatement,
|
|
|
|
extern List *PreprocessDropSchemaStmt(Node *dropSchemaStatement,
|
|
|
|
const char *queryString,
|
|
|
|
const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessAlterObjectSchemaStmt(Node *alterObjectSchemaStmt,
|
|
|
|
extern List *PreprocessAlterObjectSchemaStmt(Node *alterObjectSchemaStmt,
|
|
|
|
const char *alterObjectSchemaCommand);
|
|
|
|
const char *alterObjectSchemaCommand);
|
|
|
|
extern List * PreprocessGrantOnSchemaStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessGrantOnSchemaStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * CreateSchemaStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *CreateSchemaStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *AlterSchemaOwnerStmtObjectAddress(Node *node, bool missing_ok,
|
|
|
|
extern List * AlterSchemaOwnerStmtObjectAddress(Node *node, bool missing_ok,
|
|
|
|
|
|
|
|
bool isPostprocess);
|
|
|
|
bool isPostprocess);
|
|
|
|
extern List * AlterSchemaRenameStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *AlterSchemaRenameStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* sequence.c - forward declarations */
|
|
|
|
/* sequence.c - forward declarations */
|
|
|
|
extern List * PreprocessAlterSequenceStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterSequenceStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessAlterSequenceSchemaStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterSequenceSchemaStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * PostprocessAlterSequenceSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessAlterSequenceSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern List * PreprocessAlterSequenceOwnerStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterSequenceOwnerStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessAlterSequenceOwnerStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessAlterSequenceOwnerStmt(Node *node, const char *queryString);
|
|
|
|
#if (PG_VERSION_NUM >= PG_VERSION_15)
|
|
|
|
#if (PG_VERSION_NUM >= PG_VERSION_15)
|
|
|
|
extern List * PreprocessAlterSequencePersistenceStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterSequencePersistenceStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * PreprocessSequenceAlterTableStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessSequenceAlterTableStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
extern List * PreprocessDropSequenceStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessDropSequenceStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * SequenceDropStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List *SequenceDropStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *PreprocessRenameSequenceStmt(Node *node, const char *queryString,
|
|
|
|
extern List * PreprocessRenameSequenceStmt(Node *node, const char *queryString,
|
|
|
|
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessGrantOnSequenceStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessGrantOnSequenceStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessGrantOnSequenceStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessGrantOnSequenceStmt(Node *node, const char *queryString);
|
|
|
|
extern List * AlterSequenceStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *AlterSequenceStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *AlterSequenceSchemaStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterSequenceSchemaStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *AlterSequenceOwnerStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * AlterSequenceOwnerStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
#if (PG_VERSION_NUM >= PG_VERSION_15)
|
|
|
|
#if (PG_VERSION_NUM >= PG_VERSION_15)
|
|
|
|
extern List * AlterSequencePersistenceStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *AlterSequencePersistenceStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
extern List * RenameSequenceStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *RenameSequenceStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern void ErrorIfUnsupportedSeqStmt(CreateSeqStmt *createSeqStmt);
|
|
|
|
extern void ErrorIfUnsupportedSeqStmt(CreateSeqStmt *createSeqStmt);
|
|
|
|
extern void ErrorIfDistributedAlterSeqOwnedBy(AlterSeqStmt *alterSeqStmt);
|
|
|
|
extern void ErrorIfDistributedAlterSeqOwnedBy(AlterSeqStmt *alterSeqStmt);
|
|
|
|
extern char * GenerateBackupNameForSequenceCollision(const ObjectAddress *address);
|
|
|
|
extern char *GenerateBackupNameForSequenceCollision(const ObjectAddress *address);
|
|
|
|
extern void RenameExistingSequenceWithDifferentTypeIfExists(RangeVar *sequence,
|
|
|
|
extern void RenameExistingSequenceWithDifferentTypeIfExists(RangeVar *sequence,
|
|
|
|
Oid desiredSeqTypeId);
|
|
|
|
Oid desiredSeqTypeId);
|
|
|
|
|
|
|
|
|
|
|
|
/* statistics.c - forward declarations */
|
|
|
|
/* statistics.c - forward declarations */
|
|
|
|
extern List * PreprocessCreateStatisticsStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessCreateStatisticsStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessCreateStatisticsStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessCreateStatisticsStmt(Node *node, const char *queryString);
|
|
|
|
extern List * CreateStatisticsStmtObjectAddress(Node *node, bool missingOk, bool
|
|
|
|
extern List *CreateStatisticsStmtObjectAddress(Node *node, bool missingOk, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *PreprocessDropStatisticsStmt(Node *node, const char *queryString,
|
|
|
|
extern List * PreprocessDropStatisticsStmt(Node *node, const char *queryString,
|
|
|
|
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * DropStatisticsObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *DropStatisticsObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *PreprocessAlterStatisticsRenameStmt(Node *node, const char *queryString,
|
|
|
|
extern List * PreprocessAlterStatisticsRenameStmt(Node *node, const char *queryString,
|
|
|
|
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * PreprocessAlterStatisticsSchemaStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterStatisticsSchemaStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * PostprocessAlterStatisticsSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessAlterStatisticsSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern List * AlterStatisticsSchemaStmtObjectAddress(Node *node, bool missingOk, bool
|
|
|
|
extern List *AlterStatisticsSchemaStmtObjectAddress(Node *node, bool missingOk, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *PreprocessAlterStatisticsStmt(Node *node, const char *queryString,
|
|
|
|
extern List * PreprocessAlterStatisticsStmt(Node *node, const char *queryString,
|
|
|
|
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessAlterStatisticsOwnerStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterStatisticsOwnerStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern List * PostprocessAlterStatisticsOwnerStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessAlterStatisticsOwnerStmt(Node *node, const char *queryString);
|
|
|
|
extern List * GetExplicitStatisticsCommandList(Oid relationId);
|
|
|
|
extern List *GetExplicitStatisticsCommandList(Oid relationId);
|
|
|
|
extern List * GetExplicitStatisticsSchemaIdList(Oid relationId);
|
|
|
|
extern List *GetExplicitStatisticsSchemaIdList(Oid relationId);
|
|
|
|
extern List * GetAlterIndexStatisticsCommands(Oid indexOid);
|
|
|
|
extern List *GetAlterIndexStatisticsCommands(Oid indexOid);
|
|
|
|
|
|
|
|
|
|
|
|
/* subscription.c - forward declarations */
|
|
|
|
/* subscription.c - forward declarations */
|
|
|
|
extern Node * ProcessCreateSubscriptionStmt(CreateSubscriptionStmt *createSubStmt);
|
|
|
|
extern Node *ProcessCreateSubscriptionStmt(CreateSubscriptionStmt *createSubStmt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* table.c - forward declarations */
|
|
|
|
/* table.c - forward declarations */
|
|
|
|
extern List * PreprocessDropTableStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessDropTableStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern void PostprocessCreateTableStmt(CreateStmt *createStatement,
|
|
|
|
extern void PostprocessCreateTableStmt(CreateStmt *createStatement,
|
|
|
|
const char *queryString);
|
|
|
|
const char *queryString);
|
|
|
|
extern bool ShouldEnableLocalReferenceForeignKeys(void);
|
|
|
|
extern bool ShouldEnableLocalReferenceForeignKeys(void);
|
|
|
|
extern List * PreprocessAlterTableStmtAttachPartition(AlterTableStmt *alterTableStatement,
|
|
|
|
extern List *PreprocessAlterTableStmtAttachPartition(AlterTableStmt *alterTableStatement,
|
|
|
|
const char *queryString);
|
|
|
|
const char *queryString);
|
|
|
|
extern List * PostprocessAlterTableSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessAlterTableSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern void PrepareAlterTableStmtForConstraint(AlterTableStmt *alterTableStatement,
|
|
|
|
extern void PrepareAlterTableStmtForConstraint(AlterTableStmt *alterTableStatement,
|
|
|
|
Oid relationId, Constraint *constraint);
|
|
|
|
Oid relationId, Constraint *constraint);
|
|
|
|
extern List * PreprocessAlterTableStmt(Node *node, const char *alterTableCommand,
|
|
|
|
extern List *PreprocessAlterTableStmt(Node *node, const char *alterTableCommand,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessAlterTableMoveAllStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterTableMoveAllStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PreprocessAlterTableSchemaStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterTableSchemaStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern void SkipForeignKeyValidationIfConstraintIsFkey(AlterTableStmt *alterTableStmt,
|
|
|
|
extern void SkipForeignKeyValidationIfConstraintIsFkey(AlterTableStmt *alterTableStmt,
|
|
|
|
bool processLocalRelation);
|
|
|
|
bool processLocalRelation);
|
|
|
@ -626,15 +582,15 @@ extern void ErrorUnsupportedAlterTableAddColumn(Oid relationId, AlterTableCmd *c
|
|
|
|
extern void ErrorIfUnsupportedConstraint(Relation relation, char distributionMethod,
|
|
|
|
extern void ErrorIfUnsupportedConstraint(Relation relation, char distributionMethod,
|
|
|
|
char referencingReplicationModel,
|
|
|
|
char referencingReplicationModel,
|
|
|
|
Var *distributionColumn, uint32 colocationId);
|
|
|
|
Var *distributionColumn, uint32 colocationId);
|
|
|
|
extern List * InterShardDDLTaskList(Oid leftRelationId, Oid rightRelationId,
|
|
|
|
extern List *InterShardDDLTaskList(Oid leftRelationId, Oid rightRelationId,
|
|
|
|
const char *commandString);
|
|
|
|
const char *commandString);
|
|
|
|
extern List * AlterTableSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *AlterTableSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * MakeNameListFromRangeVar(const RangeVar *rel);
|
|
|
|
extern List *MakeNameListFromRangeVar(const RangeVar *rel);
|
|
|
|
extern Oid GetSequenceOid(Oid relationId, AttrNumber attnum);
|
|
|
|
extern Oid GetSequenceOid(Oid relationId, AttrNumber attnum);
|
|
|
|
extern bool ConstrTypeUsesIndex(ConstrType constrType);
|
|
|
|
extern bool ConstrTypeUsesIndex(ConstrType constrType);
|
|
|
|
extern bool ConstrTypeCitusCanDefaultName(ConstrType constrType);
|
|
|
|
extern bool ConstrTypeCitusCanDefaultName(ConstrType constrType);
|
|
|
|
extern char * GetAlterColumnWithNextvalDefaultCmd(Oid sequenceOid, Oid relationId,
|
|
|
|
extern char *GetAlterColumnWithNextvalDefaultCmd(Oid sequenceOid, Oid relationId,
|
|
|
|
char *colname, bool missingTableOk);
|
|
|
|
char *colname, bool missingTableOk);
|
|
|
|
|
|
|
|
|
|
|
|
extern void ErrorIfTableHasIdentityColumn(Oid relationId);
|
|
|
|
extern void ErrorIfTableHasIdentityColumn(Oid relationId);
|
|
|
@ -642,131 +598,115 @@ extern void ConvertNewTableIfNecessary(Node *createStmt);
|
|
|
|
extern void ConvertToTenantTableIfNecessary(AlterObjectSchemaStmt *alterObjectSchemaStmt);
|
|
|
|
extern void ConvertToTenantTableIfNecessary(AlterObjectSchemaStmt *alterObjectSchemaStmt);
|
|
|
|
|
|
|
|
|
|
|
|
/* text_search.c - forward declarations */
|
|
|
|
/* text_search.c - forward declarations */
|
|
|
|
extern List * GetCreateTextSearchConfigStatements(const ObjectAddress *address);
|
|
|
|
extern List *GetCreateTextSearchConfigStatements(const ObjectAddress *address);
|
|
|
|
extern List * GetCreateTextSearchDictionaryStatements(const ObjectAddress *address);
|
|
|
|
extern List *GetCreateTextSearchDictionaryStatements(const ObjectAddress *address);
|
|
|
|
extern List * CreateTextSearchConfigDDLCommandsIdempotent(const ObjectAddress *address);
|
|
|
|
extern List *CreateTextSearchConfigDDLCommandsIdempotent(const ObjectAddress *address);
|
|
|
|
extern List * CreateTextSearchDictDDLCommandsIdempotent(const ObjectAddress *address);
|
|
|
|
extern List *CreateTextSearchDictDDLCommandsIdempotent(const ObjectAddress *address);
|
|
|
|
extern List * CreateTextSearchConfigurationObjectAddress(Node *node,
|
|
|
|
extern List *CreateTextSearchConfigurationObjectAddress(Node *node,
|
|
|
|
bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * CreateTextSearchDictObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * RenameTextSearchConfigurationStmtObjectAddress(Node *node,
|
|
|
|
extern List *CreateTextSearchDictObjectAddress(Node *node,
|
|
|
|
bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * RenameTextSearchDictionaryStmtObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * AlterTextSearchConfigurationStmtObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * AlterTextSearchDictionaryStmtObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * AlterTextSearchConfigurationSchemaStmtObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * AlterTextSearchDictionarySchemaStmtObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * TextSearchConfigurationCommentObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * TextSearchDictCommentObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterTextSearchConfigurationOwnerObjectAddress(Node *node,
|
|
|
|
extern List *RenameTextSearchConfigurationStmtObjectAddress(Node *node,
|
|
|
|
bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * AlterTextSearchDictOwnerObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern char * GenerateBackupNameForTextSearchConfiguration(const ObjectAddress *address);
|
|
|
|
extern List *RenameTextSearchDictionaryStmtObjectAddress(Node *node,
|
|
|
|
extern char * GenerateBackupNameForTextSearchDict(const ObjectAddress *address);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * get_ts_config_namelist(Oid tsconfigOid);
|
|
|
|
extern List *AlterTextSearchConfigurationStmtObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
|
|
|
|
extern List *AlterTextSearchDictionaryStmtObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
|
|
|
|
extern List *AlterTextSearchConfigurationSchemaStmtObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
|
|
|
|
extern List *AlterTextSearchDictionarySchemaStmtObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
|
|
|
|
extern List *TextSearchConfigurationCommentObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
|
|
|
|
extern List *TextSearchDictCommentObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
|
|
|
|
extern List *AlterTextSearchConfigurationOwnerObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
|
|
|
|
extern List *AlterTextSearchDictOwnerObjectAddress(Node *node,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
|
|
|
|
extern char *GenerateBackupNameForTextSearchConfiguration(const ObjectAddress *address);
|
|
|
|
|
|
|
|
extern char *GenerateBackupNameForTextSearchDict(const ObjectAddress *address);
|
|
|
|
|
|
|
|
extern List *get_ts_config_namelist(Oid tsconfigOid);
|
|
|
|
|
|
|
|
|
|
|
|
/* truncate.c - forward declarations */
|
|
|
|
/* truncate.c - forward declarations */
|
|
|
|
extern void PreprocessTruncateStatement(TruncateStmt *truncateStatement);
|
|
|
|
extern void PreprocessTruncateStatement(TruncateStmt *truncateStatement);
|
|
|
|
|
|
|
|
|
|
|
|
/* type.c - forward declarations */
|
|
|
|
/* type.c - forward declarations */
|
|
|
|
extern List * PreprocessRenameTypeAttributeStmt(Node *stmt, const char *queryString,
|
|
|
|
extern List *PreprocessRenameTypeAttributeStmt(Node *stmt, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern Node * CreateTypeStmtByObjectAddress(const ObjectAddress *address);
|
|
|
|
extern Node *CreateTypeStmtByObjectAddress(const ObjectAddress *address);
|
|
|
|
extern List * CompositeTypeStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List *CompositeTypeStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *CreateEnumStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * CreateEnumStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List *AlterTypeStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *AlterEnumStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterTypeStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List *RenameTypeStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterEnumStmtObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List *AlterTypeSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
extern List * RenameTypeStmtObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern List * AlterTypeSchemaStmtObjectAddress(Node *stmt,
|
|
|
|
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * RenameTypeAttributeStmtObjectAddress(Node *stmt,
|
|
|
|
extern List *RenameTypeAttributeStmtObjectAddress(Node *stmt,
|
|
|
|
bool missing_ok);
|
|
|
|
bool missing_ok);
|
|
|
|
extern List * AlterTypeOwnerObjectAddress(Node *stmt, bool missing_ok, bool
|
|
|
|
extern List *AlterTypeOwnerObjectAddress(Node *stmt, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *CreateTypeDDLCommandsIdempotent(const ObjectAddress *typeAddress);
|
|
|
|
extern List * CreateTypeDDLCommandsIdempotent(const ObjectAddress *typeAddress);
|
|
|
|
extern char *GenerateBackupNameForTypeCollision(const ObjectAddress *address);
|
|
|
|
extern char * GenerateBackupNameForTypeCollision(const ObjectAddress *address);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* function.c - forward declarations */
|
|
|
|
/* function.c - forward declarations */
|
|
|
|
extern List * CreateFunctionDDLCommandsIdempotent(const ObjectAddress *functionAddress);
|
|
|
|
extern List *CreateFunctionDDLCommandsIdempotent(const ObjectAddress *functionAddress);
|
|
|
|
extern char * GetFunctionDDLCommand(const RegProcedure funcOid, bool useCreateOrReplace);
|
|
|
|
extern char *GetFunctionDDLCommand(const RegProcedure funcOid, bool useCreateOrReplace);
|
|
|
|
extern char * GenerateBackupNameForProcCollision(const ObjectAddress *address);
|
|
|
|
extern char *GenerateBackupNameForProcCollision(const ObjectAddress *address);
|
|
|
|
extern ObjectWithArgs * ObjectWithArgsFromOid(Oid funcOid);
|
|
|
|
extern ObjectWithArgs *ObjectWithArgsFromOid(Oid funcOid);
|
|
|
|
extern void UpdateFunctionDistributionInfo(const ObjectAddress *distAddress,
|
|
|
|
extern void UpdateFunctionDistributionInfo(const ObjectAddress *distAddress,
|
|
|
|
int *distribution_argument_index,
|
|
|
|
int *distribution_argument_index,
|
|
|
|
int *colocationId,
|
|
|
|
int *colocationId,
|
|
|
|
bool *forceDelegation);
|
|
|
|
bool *forceDelegation);
|
|
|
|
|
|
|
|
|
|
|
|
/* vacuum.c - forward declarations */
|
|
|
|
/* vacuum.c - forward declarations */
|
|
|
|
extern List * PostprocessVacuumStmt(Node *node, const char *vacuumCommand);
|
|
|
|
extern List *PostprocessVacuumStmt(Node *node, const char *vacuumCommand);
|
|
|
|
|
|
|
|
|
|
|
|
/* view.c - forward declarations */
|
|
|
|
/* view.c - forward declarations */
|
|
|
|
extern List * PreprocessViewStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessViewStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessViewStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessViewStmt(Node *node, const char *queryString);
|
|
|
|
extern List * ViewStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List *ViewStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * AlterViewStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List *AlterViewStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List * PreprocessDropViewStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessDropViewStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * DropViewStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern List *DropViewStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
extern char * CreateViewDDLCommand(Oid viewOid);
|
|
|
|
extern char *CreateViewDDLCommand(Oid viewOid);
|
|
|
|
extern List * GetViewCreationCommandsOfTable(Oid relationId);
|
|
|
|
extern List *GetViewCreationCommandsOfTable(Oid relationId);
|
|
|
|
extern char * AlterViewOwnerCommand(Oid viewOid);
|
|
|
|
extern char *AlterViewOwnerCommand(Oid viewOid);
|
|
|
|
extern char * DeparseViewStmt(Node *node);
|
|
|
|
extern char *DeparseViewStmt(Node *node);
|
|
|
|
extern char * DeparseDropViewStmt(Node *node);
|
|
|
|
extern char *DeparseDropViewStmt(Node *node);
|
|
|
|
extern bool IsViewDistributed(Oid viewOid);
|
|
|
|
extern bool IsViewDistributed(Oid viewOid);
|
|
|
|
extern List * CreateViewDDLCommandsIdempotent(Oid viewOid);
|
|
|
|
extern List *CreateViewDDLCommandsIdempotent(Oid viewOid);
|
|
|
|
extern List * PreprocessAlterViewStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterViewStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessAlterViewStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessAlterViewStmt(Node *node, const char *queryString);
|
|
|
|
extern List * PreprocessRenameViewStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessRenameViewStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * RenameViewStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *RenameViewStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
extern List *PreprocessAlterViewSchemaStmt(Node *node, const char *queryString,
|
|
|
|
extern List * PreprocessAlterViewSchemaStmt(Node *node, const char *queryString,
|
|
|
|
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessAlterViewSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessAlterViewSchemaStmt(Node *node, const char *queryString);
|
|
|
|
extern List * AlterViewSchemaStmtObjectAddress(Node *node, bool missing_ok, bool
|
|
|
|
extern List *AlterViewSchemaStmtObjectAddress(Node *node, bool missing_ok, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern bool IsViewRenameStmt(RenameStmt *renameStmt);
|
|
|
|
extern bool IsViewRenameStmt(RenameStmt *renameStmt);
|
|
|
|
|
|
|
|
|
|
|
|
/* trigger.c - forward declarations */
|
|
|
|
/* trigger.c - forward declarations */
|
|
|
|
extern List * GetExplicitTriggerCommandList(Oid relationId);
|
|
|
|
extern List *GetExplicitTriggerCommandList(Oid relationId);
|
|
|
|
extern HeapTuple GetTriggerTupleById(Oid triggerId, bool missingOk);
|
|
|
|
extern HeapTuple GetTriggerTupleById(Oid triggerId, bool missingOk);
|
|
|
|
extern List * GetExplicitTriggerIdList(Oid relationId);
|
|
|
|
extern List *GetExplicitTriggerIdList(Oid relationId);
|
|
|
|
extern List * PostprocessCreateTriggerStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessCreateTriggerStmt(Node *node, const char *queryString);
|
|
|
|
extern List * CreateTriggerStmtObjectAddress(Node *node, bool missingOk, bool
|
|
|
|
extern List *CreateTriggerStmtObjectAddress(Node *node, bool missingOk, bool isPostprocess);
|
|
|
|
isPostprocess);
|
|
|
|
|
|
|
|
extern void CreateTriggerEventExtendNames(CreateTrigStmt *createTriggerStmt,
|
|
|
|
extern void CreateTriggerEventExtendNames(CreateTrigStmt *createTriggerStmt,
|
|
|
|
char *schemaName, uint64 shardId);
|
|
|
|
char *schemaName, uint64 shardId);
|
|
|
|
extern List * PreprocessAlterTriggerRenameStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterTriggerRenameStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern List * PostprocessAlterTriggerRenameStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessAlterTriggerRenameStmt(Node *node, const char *queryString);
|
|
|
|
extern void AlterTriggerRenameEventExtendNames(RenameStmt *renameTriggerStmt,
|
|
|
|
extern void AlterTriggerRenameEventExtendNames(RenameStmt *renameTriggerStmt,
|
|
|
|
char *schemaName, uint64 shardId);
|
|
|
|
char *schemaName, uint64 shardId);
|
|
|
|
extern List * PostprocessAlterTriggerDependsStmt(Node *node, const char *queryString);
|
|
|
|
extern List *PostprocessAlterTriggerDependsStmt(Node *node, const char *queryString);
|
|
|
|
extern List * PreprocessAlterTriggerDependsStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessAlterTriggerDependsStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext
|
|
|
|
ProcessUtilityContext
|
|
|
|
processUtilityContext);
|
|
|
|
processUtilityContext);
|
|
|
|
extern void AlterTriggerDependsEventExtendNames(
|
|
|
|
extern void AlterTriggerDependsEventExtendNames(
|
|
|
@ -774,11 +714,11 @@ extern void AlterTriggerDependsEventExtendNames(
|
|
|
|
char *schemaName, uint64 shardId);
|
|
|
|
char *schemaName, uint64 shardId);
|
|
|
|
extern void ErrorOutForTriggerIfNotSupported(Oid relationId);
|
|
|
|
extern void ErrorOutForTriggerIfNotSupported(Oid relationId);
|
|
|
|
extern void ErrorIfRelationHasUnsupportedTrigger(Oid relationId);
|
|
|
|
extern void ErrorIfRelationHasUnsupportedTrigger(Oid relationId);
|
|
|
|
extern List * PreprocessDropTriggerStmt(Node *node, const char *queryString,
|
|
|
|
extern List *PreprocessDropTriggerStmt(Node *node, const char *queryString,
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
ProcessUtilityContext processUtilityContext);
|
|
|
|
extern void DropTriggerEventExtendNames(DropStmt *dropTriggerStmt, char *schemaName,
|
|
|
|
extern void DropTriggerEventExtendNames(DropStmt *dropTriggerStmt, char *schemaName,
|
|
|
|
uint64 shardId);
|
|
|
|
uint64 shardId);
|
|
|
|
extern List * CitusCreateTriggerCommandDDLJob(Oid relationId, char *triggerName,
|
|
|
|
extern List *CitusCreateTriggerCommandDDLJob(Oid relationId, char *triggerName,
|
|
|
|
const char *queryString);
|
|
|
|
const char *queryString);
|
|
|
|
extern Oid GetTriggerFunctionId(Oid triggerId);
|
|
|
|
extern Oid GetTriggerFunctionId(Oid triggerId);
|
|
|
|
|
|
|
|
|
|
|
@ -811,7 +751,7 @@ extern void CascadeOperationForRelationIdList(List *relationIdList, LOCKMODE loc
|
|
|
|
CascadeOperationType cascadeOperationType);
|
|
|
|
CascadeOperationType cascadeOperationType);
|
|
|
|
extern void ErrorIfAnyPartitionRelationInvolvedInNonInheritedFKey(List *relationIdList);
|
|
|
|
extern void ErrorIfAnyPartitionRelationInvolvedInNonInheritedFKey(List *relationIdList);
|
|
|
|
extern bool RelationIdListHasReferenceTable(List *relationIdList);
|
|
|
|
extern bool RelationIdListHasReferenceTable(List *relationIdList);
|
|
|
|
extern List * GetFKeyCreationCommandsForRelationIdList(List *relationIdList);
|
|
|
|
extern List *GetFKeyCreationCommandsForRelationIdList(List *relationIdList);
|
|
|
|
extern void DropRelationForeignKeys(Oid relationId, int flags);
|
|
|
|
extern void DropRelationForeignKeys(Oid relationId, int flags);
|
|
|
|
extern void SetLocalEnableLocalReferenceForeignKeys(bool state);
|
|
|
|
extern void SetLocalEnableLocalReferenceForeignKeys(bool state);
|
|
|
|
extern void ExecuteAndLogUtilityCommandListInTableTypeConversionViaSPI(
|
|
|
|
extern void ExecuteAndLogUtilityCommandListInTableTypeConversionViaSPI(
|
|
|
@ -825,7 +765,7 @@ extern void ExecuteForeignKeyCreateCommandList(List *ddlCommandList,
|
|
|
|
extern void CreateCitusLocalTable(Oid relationId, bool cascadeViaForeignKeys,
|
|
|
|
extern void CreateCitusLocalTable(Oid relationId, bool cascadeViaForeignKeys,
|
|
|
|
bool autoConverted);
|
|
|
|
bool autoConverted);
|
|
|
|
extern bool ShouldAddNewTableToMetadata(Oid relationId);
|
|
|
|
extern bool ShouldAddNewTableToMetadata(Oid relationId);
|
|
|
|
extern List * GetExplicitIndexOidList(Oid relationId);
|
|
|
|
extern List *GetExplicitIndexOidList(Oid relationId);
|
|
|
|
|
|
|
|
|
|
|
|
extern bool ShouldPropagateSetCommand(VariableSetStmt *setStmt);
|
|
|
|
extern bool ShouldPropagateSetCommand(VariableSetStmt *setStmt);
|
|
|
|
extern void PostprocessVariableSetStmt(VariableSetStmt *setStmt, const char *setCommand);
|
|
|
|
extern void PostprocessVariableSetStmt(VariableSetStmt *setStmt, const char *setCommand);
|
|
|
|