Apply suggestions from code review

Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
pull/7563/head
Gürkan İndibay 2024-04-02 09:14:35 +03:00 committed by GitHub
parent 179f2e5fad
commit 62de6dc0b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -699,12 +699,8 @@ List *
PreprocessAlterDatabaseOwnerStmt(Node *node, const char *queryString,
ProcessUtilityContext processUtilityContext)
{
const DistributeObjectOps *ops = GetDistributeObjectOps(node);
Assert(ops != NULL);
if (ops->featureFlag && *ops->featureFlag == false)
if (!EnableAlterDatabaseOwner)
{
/* not propagating when a configured feature flag is turned off by the user */
return NIL;
}
@ -717,6 +713,7 @@ PreprocessAlterDatabaseOwnerStmt(Node *node, const char *queryString,
{
return NIL;
}
EnsurePropagationToCoordinator();
AlterOwnerStmt *stmt = (AlterOwnerStmt *) node;

View File

@ -76,6 +76,10 @@ static bool GrantStmtCheckSupportedObjectType(Node *node);
static bool SecLabelStmtCheckSupportedObjectType(Node *node);
static bool AlterDbRenameCheckSupportedObjectType(Node *node);
static bool AlterDbOwnerCheckSupportedObjectType(Node *node);
/*
* cannotBeExecutedInTransaction callbacks for OperationArray.
*/
static bool CannotBeExecutedInTransaction_True(Node *node);
static bool CannotBeExecutedInTransaction_False(Node *node);
static bool AlterDbCannotBeExecutedInTransaction(Node *node);

View File

@ -236,7 +236,6 @@ extern List * PreprocessAlterDatabaseRefreshCollStmt(Node *node, const char *que
processUtilityContext);
extern List * PreprocessAlterDatabaseOwnerStmt(Node *node, const char *queryString,
ProcessUtilityContext processUtilityContext);
extern List * GetDatabaseMetadataSyncCommands(Oid dbOid);