From 93015319410d8461d7aca0be07b3fb057eb64c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrkan=20=C4=B0ndibay?= Date: Mon, 27 Nov 2023 22:19:42 +0300 Subject: [PATCH 1/2] Apply suggestions from code review Co-authored-by: Onur Tirtir --- src/backend/distributed/commands/database.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/backend/distributed/commands/database.c b/src/backend/distributed/commands/database.c index 12c884b12..50474e0c0 100644 --- a/src/backend/distributed/commands/database.c +++ b/src/backend/distributed/commands/database.c @@ -192,17 +192,8 @@ PreprocessGrantOnDatabaseStmt(Node *node, const char *queryString, /* - * Checks if the provided ALTER DATABASE statement is a SET TABLESPACE statement. - * - * This function takes a Node pointer representing a AlterDatabaseStmt, and checks - * if it is a SET TABLESPACE statement, which is used to move a table to a new - * tablespace. - * - * Parameters: - * stmt: A pointer to a Node representing AlterDatabaseStmt. - * - * Returns: - * true if the statement is a SET TABLESPACE statement, false otherwise. + * IsSetTablespaceStatement returns true if given AlterDatabaseStmt contains + * a DefElem to alter tablespace of the target database. */ static bool isSetTablespaceStatement(AlterDatabaseStmt *stmt) From 05260337503c92f338ba7759a4801aa2b15db036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrkan=20=C4=B0ndibay?= Date: Mon, 27 Nov 2023 22:29:28 +0300 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Onur Tirtir --- .../deparser/deparse_database_stmts.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/backend/distributed/deparser/deparse_database_stmts.c b/src/backend/distributed/deparser/deparse_database_stmts.c index b0fe4f820..cbb5c9510 100644 --- a/src/backend/distributed/deparser/deparse_database_stmts.c +++ b/src/backend/distributed/deparser/deparse_database_stmts.c @@ -65,22 +65,6 @@ const DefElemOptionFormat alterDatabaseOptionFormats[] = { }; -/* - * DeparseAlterDatabaseOwnerStmt - * Deparse an AlterDatabaseOwnerStmt node - * - * This function is responsible for producing a string representation of an - * AlterDatabaseOwnerStmt node, which represents an ALTER DATABASE statement - * that changes the owner of a database. The output string includes the ALTER - * DATABASE keyword, the name of the database being altered, and the new owner - * of the database. - * - * Parameters: - * - node: a pointer to the AlterDatabaseOwnerStmt node to be deparsed - * - * Returns: - * - a string representation of the ALTER DATABASE statement - */ char * DeparseAlterDatabaseOwnerStmt(Node *node) {