mirror of https://github.com/citusdata/citus.git
rename Pre/PostprocessAlterDistributedObjectStmt to Pre/PostprocessAlterDistributedObjectStmtFromCoordinator
parent
8388b80dd3
commit
25507a5804
|
|
@ -1819,13 +1819,13 @@ Each field in the struct is documented in the comments within the `DistributeObj
|
|||
|
||||
- **Returning tasks for `preprocess` and `postprocess`**: Ensure that either `preprocess` or `postprocess` returns a list of "DDLJob"s. If both functions return non-empty lists, then you would get an assertion failure.
|
||||
|
||||
- **Generic `preprocess` and `postprocess` methods**: The generic methods, `PreprocessAlterDistributedObjectStmt` and `PostprocessAlterDistributedObjectStmt`, serve as generic pre and post methods utilized for various statements. Both of these methods find application in distributed object operations.
|
||||
- **Generic `preprocess` and `postprocess` methods**: The generic methods, `PreprocessAlterDistributedObjectStmtFromCoordinator` and `PostprocessAlterDistributedObjectStmtFromCoordinator`, serve as generic pre and post methods utilized for various statements. Both of these methods find application in distributed object operations.
|
||||
|
||||
- The `PreprocessAlterDistributedObjectStmt` method carries out the following operations:
|
||||
- The `PreprocessAlterDistributedObjectStmtFromCoordinator` method carries out the following operations:
|
||||
- Performs a qualification operation.
|
||||
- Deparses the statement and generates a task list.
|
||||
|
||||
- As for the `PostprocessAlterDistributedObjectStmt` method, it:
|
||||
- As for the `PostprocessAlterDistributedObjectStmtFromCoordinator` method, it:
|
||||
- Invokes the `EnsureAllObjectDependenciesExistOnAllNodes` function to propagate missing dependencies, both on the coordinator and the worker.
|
||||
|
||||
- Before defining new `preprocess` or `postprocess` methods, it is advisable to assess whether the generic methods can be employed in your specific case.
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@ PostprocessCreateDistributedObjectFromCatalogStmt(Node *stmt, const char *queryS
|
|||
|
||||
|
||||
/*
|
||||
* PreprocessAlterDistributedObjectStmt handles any updates to distributed objects by
|
||||
* creating the fully qualified sql to apply to all workers after checking all
|
||||
* PreprocessAlterDistributedObjectStmtFromCoordinator handles any updates to distributed
|
||||
* objects by creating the fully qualified sql to apply to all workers after checking all
|
||||
* predconditions that apply to propagating changes.
|
||||
*
|
||||
* Preconditions are (in order):
|
||||
|
|
@ -123,8 +123,9 @@ PostprocessCreateDistributedObjectFromCatalogStmt(Node *stmt, const char *queryS
|
|||
* recursion of propagation with Citus' MX functionality.
|
||||
*/
|
||||
List *
|
||||
PreprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString,
|
||||
ProcessUtilityContext processUtilityContext)
|
||||
PreprocessAlterDistributedObjectStmtFromCoordinator(Node *stmt, const char *queryString,
|
||||
ProcessUtilityContext
|
||||
processUtilityContext)
|
||||
{
|
||||
const DistributeObjectOps *ops = GetDistributeObjectOps(stmt);
|
||||
Assert(ops != NULL);
|
||||
|
|
@ -160,9 +161,9 @@ PreprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString,
|
|||
|
||||
|
||||
/*
|
||||
* PostprocessAlterDistributedObjectStmt is the counter part of
|
||||
* PreprocessAlterDistributedObjectStmt that should be executed after the object has been
|
||||
* changed locally.
|
||||
* PostprocessAlterDistributedObjectStmtFromCoordinator is the counter part of
|
||||
* PreprocessAlterDistributedObjectStmtFromCoordinator that should be executed after the
|
||||
* object has been changed locally.
|
||||
*
|
||||
* We perform the same precondition checks as before to skip this operation if any of the
|
||||
* failed during preprocessing. Since we already raised an error on other checks we don't
|
||||
|
|
@ -173,7 +174,7 @@ PreprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString,
|
|||
* they get created on the workers before we send the command list to the workers.
|
||||
*/
|
||||
List *
|
||||
PostprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString)
|
||||
PostprocessAlterDistributedObjectStmtFromCoordinator(Node *stmt, const char *queryString)
|
||||
{
|
||||
const DistributeObjectOps *ops = GetDistributeObjectOps(stmt);
|
||||
Assert(ops != NULL);
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ static DistributeObjectOps NoDistributeOps = {
|
|||
static DistributeObjectOps Aggregate_AlterObjectSchema = {
|
||||
.deparse = DeparseAlterFunctionSchemaStmt,
|
||||
.qualify = QualifyAlterFunctionSchemaStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterFunctionSchemaStmtObjectAddress,
|
||||
|
|
@ -42,8 +42,8 @@ static DistributeObjectOps Aggregate_AlterObjectSchema = {
|
|||
static DistributeObjectOps Aggregate_AlterOwner = {
|
||||
.deparse = DeparseAlterFunctionOwnerStmt,
|
||||
.qualify = QualifyAlterFunctionOwnerStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterFunctionOwnerObjectAddress,
|
||||
|
|
@ -71,7 +71,7 @@ static DistributeObjectOps Aggregate_Drop = {
|
|||
static DistributeObjectOps Aggregate_Rename = {
|
||||
.deparse = DeparseRenameFunctionStmt,
|
||||
.qualify = QualifyRenameFunctionStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -90,7 +90,7 @@ static DistributeObjectOps Aggregate_Grant = {
|
|||
static DistributeObjectOps Any_AlterEnum = {
|
||||
.deparse = DeparseAlterEnumStmt,
|
||||
.qualify = QualifyAlterEnumStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_TYPE,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -118,7 +118,7 @@ static DistributeObjectOps Any_AlterExtensionContents = {
|
|||
static DistributeObjectOps Any_AlterForeignServer = {
|
||||
.deparse = DeparseAlterForeignServerStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_FOREIGN_SERVER,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -309,7 +309,7 @@ static DistributeObjectOps Any_DropRole = {
|
|||
static DistributeObjectOps Role_Comment = {
|
||||
.deparse = DeparseCommentStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_DATABASE,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -446,8 +446,8 @@ static DistributeObjectOps Attribute_Rename = {
|
|||
static DistributeObjectOps Collation_AlterObjectSchema = {
|
||||
.deparse = DeparseAlterCollationSchemaStmt,
|
||||
.qualify = QualifyAlterCollationSchemaStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_COLLATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterCollationSchemaStmtObjectAddress,
|
||||
|
|
@ -456,8 +456,8 @@ static DistributeObjectOps Collation_AlterObjectSchema = {
|
|||
static DistributeObjectOps Collation_AlterOwner = {
|
||||
.deparse = DeparseAlterCollationOwnerStmt,
|
||||
.qualify = QualifyAlterCollationOwnerStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_COLLATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterCollationOwnerObjectAddress,
|
||||
|
|
@ -485,7 +485,7 @@ static DistributeObjectOps Collation_Drop = {
|
|||
static DistributeObjectOps Collation_Rename = {
|
||||
.deparse = DeparseRenameCollationStmt,
|
||||
.qualify = QualifyRenameCollationStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_COLLATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -495,8 +495,8 @@ static DistributeObjectOps Collation_Rename = {
|
|||
static DistributeObjectOps Database_AlterOwner = {
|
||||
.deparse = DeparseAlterDatabaseOwnerStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_DATABASE,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.featureFlag = &EnableAlterDatabaseOwner,
|
||||
|
|
@ -573,7 +573,7 @@ static DistributeObjectOps Database_Set = {
|
|||
static DistributeObjectOps Database_Comment = {
|
||||
.deparse = DeparseCommentStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_DATABASE,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -595,8 +595,8 @@ static DistributeObjectOps Database_Rename = {
|
|||
static DistributeObjectOps Domain_Alter = {
|
||||
.deparse = DeparseAlterDomainStmt,
|
||||
.qualify = QualifyAlterDomainStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_DOMAIN,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterDomainStmtObjectAddress,
|
||||
|
|
@ -605,8 +605,8 @@ static DistributeObjectOps Domain_Alter = {
|
|||
static DistributeObjectOps Domain_AlterObjectSchema = {
|
||||
.deparse = DeparseAlterDomainSchemaStmt,
|
||||
.qualify = QualifyAlterDomainSchemaStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_DOMAIN,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterTypeSchemaStmtObjectAddress,
|
||||
|
|
@ -615,8 +615,8 @@ static DistributeObjectOps Domain_AlterObjectSchema = {
|
|||
static DistributeObjectOps Domain_AlterOwner = {
|
||||
.deparse = DeparseAlterDomainOwnerStmt,
|
||||
.qualify = QualifyAlterDomainOwnerStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_DOMAIN,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterDomainOwnerStmtObjectAddress,
|
||||
|
|
@ -634,7 +634,7 @@ static DistributeObjectOps Domain_Drop = {
|
|||
static DistributeObjectOps Domain_Rename = {
|
||||
.deparse = DeparseRenameDomainStmt,
|
||||
.qualify = QualifyRenameDomainStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_DOMAIN,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -645,7 +645,7 @@ static DistributeObjectOps Domain_Rename = {
|
|||
static DistributeObjectOps Domain_RenameConstraint = {
|
||||
.deparse = DeparseDomainRenameConstraintStmt,
|
||||
.qualify = QualifyDomainRenameConstraintStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_DOMAIN,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -700,7 +700,7 @@ static DistributeObjectOps ForeignServer_Grant = {
|
|||
static DistributeObjectOps ForeignServer_Rename = {
|
||||
.deparse = DeparseAlterForeignServerRenameStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_FOREIGN_SERVER,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -710,8 +710,8 @@ static DistributeObjectOps ForeignServer_Rename = {
|
|||
static DistributeObjectOps ForeignServer_AlterOwner = {
|
||||
.deparse = DeparseAlterForeignServerOwnerStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_FOREIGN_SERVER,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterForeignServerOwnerStmtObjectAddress,
|
||||
|
|
@ -738,8 +738,8 @@ static DistributeObjectOps Function_AlterObjectDepends = {
|
|||
static DistributeObjectOps Function_AlterObjectSchema = {
|
||||
.deparse = DeparseAlterFunctionSchemaStmt,
|
||||
.qualify = QualifyAlterFunctionSchemaStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterFunctionSchemaStmtObjectAddress,
|
||||
|
|
@ -748,8 +748,8 @@ static DistributeObjectOps Function_AlterObjectSchema = {
|
|||
static DistributeObjectOps Function_AlterOwner = {
|
||||
.deparse = DeparseAlterFunctionOwnerStmt,
|
||||
.qualify = QualifyAlterFunctionOwnerStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterFunctionOwnerObjectAddress,
|
||||
|
|
@ -785,7 +785,7 @@ static DistributeObjectOps View_Drop = {
|
|||
static DistributeObjectOps Function_Rename = {
|
||||
.deparse = DeparseRenameFunctionStmt,
|
||||
.qualify = QualifyRenameFunctionStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -831,8 +831,8 @@ static DistributeObjectOps Procedure_AlterObjectDepends = {
|
|||
static DistributeObjectOps Procedure_AlterObjectSchema = {
|
||||
.deparse = DeparseAlterFunctionSchemaStmt,
|
||||
.qualify = QualifyAlterFunctionSchemaStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterFunctionSchemaStmtObjectAddress,
|
||||
|
|
@ -841,8 +841,8 @@ static DistributeObjectOps Procedure_AlterObjectSchema = {
|
|||
static DistributeObjectOps Procedure_AlterOwner = {
|
||||
.deparse = DeparseAlterFunctionOwnerStmt,
|
||||
.qualify = QualifyAlterFunctionOwnerStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterFunctionOwnerObjectAddress,
|
||||
|
|
@ -869,7 +869,7 @@ static DistributeObjectOps Procedure_Grant = {
|
|||
static DistributeObjectOps Procedure_Rename = {
|
||||
.deparse = DeparseRenameFunctionStmt,
|
||||
.qualify = QualifyRenameFunctionStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -880,7 +880,7 @@ static DistributeObjectOps Publication_Alter = {
|
|||
.deparse = DeparseAlterPublicationStmt,
|
||||
.qualify = QualifyAlterPublicationStmt,
|
||||
.preprocess = PreprocessAlterPublicationStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_PUBLICATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterPublicationStmtObjectAddress,
|
||||
|
|
@ -889,8 +889,8 @@ static DistributeObjectOps Publication_Alter = {
|
|||
static DistributeObjectOps Publication_AlterOwner = {
|
||||
.deparse = DeparseAlterPublicationOwnerStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_PUBLICATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterPublicationOwnerStmtObjectAddress,
|
||||
|
|
@ -908,7 +908,7 @@ static DistributeObjectOps Publication_Drop = {
|
|||
static DistributeObjectOps Publication_Rename = {
|
||||
.deparse = DeparseRenamePublicationStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_PUBLICATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -990,7 +990,7 @@ static DistributeObjectOps Sequence_Rename = {
|
|||
static DistributeObjectOps TextSearchConfig_Alter = {
|
||||
.deparse = DeparseAlterTextSearchConfigurationStmt,
|
||||
.qualify = QualifyAlterTextSearchConfigurationStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_TSCONFIGURATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -1000,8 +1000,8 @@ static DistributeObjectOps TextSearchConfig_Alter = {
|
|||
static DistributeObjectOps TextSearchConfig_AlterObjectSchema = {
|
||||
.deparse = DeparseAlterTextSearchConfigurationSchemaStmt,
|
||||
.qualify = QualifyAlterTextSearchConfigurationSchemaStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_TSCONFIGURATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterTextSearchConfigurationSchemaStmtObjectAddress,
|
||||
|
|
@ -1010,8 +1010,8 @@ static DistributeObjectOps TextSearchConfig_AlterObjectSchema = {
|
|||
static DistributeObjectOps TextSearchConfig_AlterOwner = {
|
||||
.deparse = DeparseAlterTextSearchConfigurationOwnerStmt,
|
||||
.qualify = QualifyAlterTextSearchConfigurationOwnerStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_TSCONFIGURATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterTextSearchConfigurationOwnerObjectAddress,
|
||||
|
|
@ -1025,7 +1025,7 @@ static DistributeObjectOps TextSearchConfig_Comment = {
|
|||
* and adress function
|
||||
*/
|
||||
.qualify = QualifyTextSearchConfigurationCommentStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_TSCONFIGURATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -1054,7 +1054,7 @@ static DistributeObjectOps TextSearchConfig_Drop = {
|
|||
static DistributeObjectOps TextSearchConfig_Rename = {
|
||||
.deparse = DeparseRenameTextSearchConfigurationStmt,
|
||||
.qualify = QualifyRenameTextSearchConfigurationStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_TSCONFIGURATION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -1064,7 +1064,7 @@ static DistributeObjectOps TextSearchConfig_Rename = {
|
|||
static DistributeObjectOps TextSearchDict_Alter = {
|
||||
.deparse = DeparseAlterTextSearchDictionaryStmt,
|
||||
.qualify = QualifyAlterTextSearchDictionaryStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_TSDICTIONARY,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -1074,8 +1074,8 @@ static DistributeObjectOps TextSearchDict_Alter = {
|
|||
static DistributeObjectOps TextSearchDict_AlterObjectSchema = {
|
||||
.deparse = DeparseAlterTextSearchDictionarySchemaStmt,
|
||||
.qualify = QualifyAlterTextSearchDictionarySchemaStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_TSDICTIONARY,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterTextSearchDictionarySchemaStmtObjectAddress,
|
||||
|
|
@ -1084,8 +1084,8 @@ static DistributeObjectOps TextSearchDict_AlterObjectSchema = {
|
|||
static DistributeObjectOps TextSearchDict_AlterOwner = {
|
||||
.deparse = DeparseAlterTextSearchDictionaryOwnerStmt,
|
||||
.qualify = QualifyAlterTextSearchDictionaryOwnerStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_TSDICTIONARY,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterTextSearchDictOwnerObjectAddress,
|
||||
|
|
@ -1094,7 +1094,7 @@ static DistributeObjectOps TextSearchDict_AlterOwner = {
|
|||
static DistributeObjectOps TextSearchDict_Comment = {
|
||||
.deparse = DeparseCommentStmt,
|
||||
.qualify = QualifyTextSearchDictionaryCommentStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_TSDICTIONARY,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -1123,7 +1123,7 @@ static DistributeObjectOps TextSearchDict_Drop = {
|
|||
static DistributeObjectOps TextSearchDict_Rename = {
|
||||
.deparse = DeparseRenameTextSearchDictionaryStmt,
|
||||
.qualify = QualifyRenameTextSearchDictionaryStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_TSDICTIONARY,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -1142,8 +1142,8 @@ static DistributeObjectOps Trigger_AlterObjectDepends = {
|
|||
static DistributeObjectOps Routine_AlterObjectSchema = {
|
||||
.deparse = DeparseAlterFunctionSchemaStmt,
|
||||
.qualify = QualifyAlterFunctionSchemaStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterFunctionSchemaStmtObjectAddress,
|
||||
|
|
@ -1152,8 +1152,8 @@ static DistributeObjectOps Routine_AlterObjectSchema = {
|
|||
static DistributeObjectOps Routine_AlterOwner = {
|
||||
.deparse = DeparseAlterFunctionOwnerStmt,
|
||||
.qualify = QualifyAlterFunctionOwnerStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterFunctionOwnerObjectAddress,
|
||||
|
|
@ -1180,7 +1180,7 @@ static DistributeObjectOps Routine_Grant = {
|
|||
static DistributeObjectOps Routine_Rename = {
|
||||
.deparse = DeparseRenameFunctionStmt,
|
||||
.qualify = QualifyRenameFunctionStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_FUNCTION,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -1190,7 +1190,7 @@ static DistributeObjectOps Routine_Rename = {
|
|||
static DistributeObjectOps Schema_AlterOwner = {
|
||||
.deparse = DeparseAlterSchemaOwnerStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.postprocess = NULL,
|
||||
.address = AlterSchemaOwnerStmtObjectAddress,
|
||||
|
|
@ -1217,7 +1217,7 @@ static DistributeObjectOps Schema_Grant = {
|
|||
static DistributeObjectOps Schema_Rename = {
|
||||
.deparse = DeparseAlterSchemaRenameStmt,
|
||||
.qualify = NULL,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_SCHEMA,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -1299,8 +1299,8 @@ static DistributeObjectOps Table_Drop = {
|
|||
static DistributeObjectOps Type_AlterObjectSchema = {
|
||||
.deparse = DeparseAlterTypeSchemaStmt,
|
||||
.qualify = QualifyAlterTypeSchemaStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_TYPE,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterTypeSchemaStmtObjectAddress,
|
||||
|
|
@ -1326,8 +1326,8 @@ static DistributeObjectOps View_AlterObjectSchema = {
|
|||
static DistributeObjectOps Type_AlterOwner = {
|
||||
.deparse = DeparseAlterTypeOwnerStmt,
|
||||
.qualify = QualifyAlterTypeOwnerStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = PostprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.objectType = OBJECT_TYPE,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
.address = AlterTypeOwnerObjectAddress,
|
||||
|
|
@ -1336,7 +1336,7 @@ static DistributeObjectOps Type_AlterOwner = {
|
|||
static DistributeObjectOps Type_AlterTable = {
|
||||
.deparse = DeparseAlterTypeStmt,
|
||||
.qualify = QualifyAlterTypeStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_TYPE,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
@ -1381,7 +1381,7 @@ static DistributeObjectOps Trigger_Drop = {
|
|||
static DistributeObjectOps Type_Rename = {
|
||||
.deparse = DeparseRenameTypeStmt,
|
||||
.qualify = QualifyRenameTypeStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmt,
|
||||
.preprocess = PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
.postprocess = NULL,
|
||||
.objectType = OBJECT_TYPE,
|
||||
.operationType = DIST_OPS_ALTER,
|
||||
|
|
|
|||
|
|
@ -336,8 +336,8 @@ BuildPublicationRelationObjSpec(Oid relationId, Oid publicationId,
|
|||
|
||||
|
||||
/*
|
||||
* PreprocessAlterPublicationStmt handles ALTER PUBLICATION statements
|
||||
* in a way that is mostly similar to PreprocessAlterDistributedObjectStmt,
|
||||
* PreprocessAlterPublicationStmt handles ALTER PUBLICATION statements in a way
|
||||
* that is mostly similar to PreprocessAlterDistributedObjectStmtFromCoordinator,
|
||||
* except we do not ensure sequential mode (publications do not interact with
|
||||
* shards) and can handle NULL deparse commands for ALTER PUBLICATION commands
|
||||
* that only involve local tables.
|
||||
|
|
|
|||
|
|
@ -187,10 +187,12 @@ extern List * PreprocessClusterStmt(Node *node, const char *clusterCommand,
|
|||
/* common.c - forward declarations*/
|
||||
extern List * PostprocessCreateDistributedObjectFromCatalogStmt(Node *stmt,
|
||||
const char *queryString);
|
||||
extern List * PreprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString,
|
||||
extern List * PreprocessAlterDistributedObjectStmtFromCoordinator(Node *stmt,
|
||||
const char *queryString,
|
||||
ProcessUtilityContext
|
||||
processUtilityContext);
|
||||
extern List * PostprocessAlterDistributedObjectStmt(Node *stmt, const char *queryString);
|
||||
extern List * PostprocessAlterDistributedObjectStmtFromCoordinator(Node *stmt,
|
||||
const char *queryString);
|
||||
extern List * PreprocessDropDistributedObjectStmt(Node *node, const char *queryString,
|
||||
ProcessUtilityContext
|
||||
processUtilityContext);
|
||||
|
|
|
|||
Loading…
Reference in New Issue