Rename function

pull/4480/head
Onder Kalaci 2021-01-14 20:44:54 +03:00
parent 30d0a65f40
commit ae0b92233d
3 changed files with 5 additions and 7 deletions

View File

@ -1098,13 +1098,12 @@ PreprocessAlterTableSchemaStmt(Node *node, const char *queryString,
/*
* WorkerProcessAlterTableStmt checks and processes the alter table statement to be
* worked on the distributed table of the worker node. Currently, it only processes
* SkipForeignKeyValidationIfConstraintIsFkey checks and processes the alter table
* statement to be worked on the distributed table. Currently, it only processes
* ALTER TABLE ... ADD FOREIGN KEY command to skip the validation step.
*/
Node *
WorkerProcessAlterTableStmt(AlterTableStmt *alterTableStatement,
const char *alterTableCommand)
SkipForeignKeyValidationIfConstraintIsFkey(AlterTableStmt *alterTableStatement)
{
/* first check whether a distributed relation is affected */
if (alterTableStatement->relation == NULL)

View File

@ -416,7 +416,7 @@ multi_ProcessUtility(PlannedStmt *pstmt,
* Note validation is done on the shard level when DDL propagation
* is enabled. The following eagerly executes some tasks on workers.
*/
parsetree = WorkerProcessAlterTableStmt(alterTableStmt, queryString);
parsetree = SkipForeignKeyValidationIfConstraintIsFkey(alterTableStmt);
}
}
}

View File

@ -368,8 +368,7 @@ extern List * PreprocessAlterTableMoveAllStmt(Node *node, const char *queryStrin
ProcessUtilityContext processUtilityContext);
extern List * PreprocessAlterTableSchemaStmt(Node *node, const char *queryString,
ProcessUtilityContext processUtilityContext);
extern Node * WorkerProcessAlterTableStmt(AlterTableStmt *alterTableStatement,
const char *alterTableCommand);
extern Node * SkipForeignKeyValidationIfConstraintIsFkey(AlterTableStmt *alterTableStmt);
extern bool IsAlterTableRenameStmt(RenameStmt *renameStmt);
extern void ErrorIfAlterDropsPartitionColumn(AlterTableStmt *alterTableStatement);
extern void PostprocessAlterTableStmt(AlterTableStmt *pStmt);