Fixes pre review check results

pull/7253/head
gindibay 2023-11-22 03:33:03 +03:00
parent 49b1f9a095
commit 63e3738f46
5 changed files with 14 additions and 14 deletions

View File

@ -73,7 +73,7 @@ static char * GetTablespaceName(Oid tablespaceOid);
static ObjectAddress * GetDatabaseAddressFromDatabaseName(char *databaseName, bool static ObjectAddress * GetDatabaseAddressFromDatabaseName(char *databaseName, bool
missingOk); missingOk);
static Oid get_database_owner(Oid db_oid); static Oid get_database_owner(Oid dbId);
/* controlled via GUC */ /* controlled via GUC */

View File

@ -20,7 +20,6 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "commands/defrem.h" #include "commands/defrem.h"
#include "distributed/deparser.h"
#include "distributed/commands.h" #include "distributed/commands.h"
#include "distributed/citus_ruleutils.h" #include "distributed/citus_ruleutils.h"
#include "distributed/deparser.h" #include "distributed/deparser.h"
@ -97,15 +96,6 @@ DeparseAlterDatabaseOwnerStmt(Node *node)
} }
/*
*
* AppendAlterDatabaseOwnerStmt
* Append an ALTER DATABASE statement for changing the owner of a database to the given StringInfo buffer.
*
* Parameters:
* - buf: The StringInfo buffer to append the statement to.
* - stmt: The AlterOwnerStmt representing the ALTER DATABASE statement to append.
*/
static void static void
AppendAlterDatabaseOwnerStmt(StringInfo buf, AlterOwnerStmt *stmt) AppendAlterDatabaseOwnerStmt(StringInfo buf, AlterOwnerStmt *stmt)
{ {

View File

@ -244,10 +244,7 @@ extern List * DropDatabaseStmtObjectAddress(Node *node, bool missingOk,
extern List * CreateDatabaseStmtObjectAddress(Node *node, bool missingOk, extern List * CreateDatabaseStmtObjectAddress(Node *node, bool missingOk,
bool isPostprocess); bool isPostprocess);
extern List * GenerateGrantDatabaseCommandList(void); extern List * GenerateGrantDatabaseCommandList(void);
extern List * PostprocessAlterDatabaseRenameStmt(Node *node, const char *queryString); extern List * PostprocessAlterDatabaseRenameStmt(Node *node, const char *queryString);
extern void EnsureSupportedCreateDatabaseCommand(CreatedbStmt *stmt); extern void EnsureSupportedCreateDatabaseCommand(CreatedbStmt *stmt);
extern char * CreateDatabaseDDLCommand(Oid dbId); extern char * CreateDatabaseDDLCommand(Oid dbId);

View File

@ -932,6 +932,11 @@ SELECT * FROM public.check_database_on_all_nodes('test_db') ORDER BY node_type;
REVOKE CONNECT ON DATABASE test_db FROM propagated_role; REVOKE CONNECT ON DATABASE test_db FROM propagated_role;
DROP DATABASE test_db; DROP DATABASE test_db;
DROP ROLE propagated_role, non_propagated_role; DROP ROLE propagated_role, non_propagated_role;
--test that create database with oid option failed when citus.enable_create_database_propagation is on
set citus.enable_create_database_propagation TO on;
CREATE DATABASE db_oid_test WITH OID 123;
ERROR: CREATE DATABASE option "oid" is not supported
set citus.enable_create_database_propagation TO off;
--clean up resources created by this test --clean up resources created by this test
-- DROP TABLESPACE is not supported, so we need to drop it manually. -- DROP TABLESPACE is not supported, so we need to drop it manually.
SELECT result FROM run_command_on_all_nodes( SELECT result FROM run_command_on_all_nodes(

View File

@ -536,6 +536,14 @@ REVOKE CONNECT ON DATABASE test_db FROM propagated_role;
DROP DATABASE test_db; DROP DATABASE test_db;
DROP ROLE propagated_role, non_propagated_role; DROP ROLE propagated_role, non_propagated_role;
--test that create database with oid option failed when citus.enable_create_database_propagation is on
set citus.enable_create_database_propagation TO on;
CREATE DATABASE db_oid_test WITH OID 123;
set citus.enable_create_database_propagation TO off;
--clean up resources created by this test --clean up resources created by this test
-- DROP TABLESPACE is not supported, so we need to drop it manually. -- DROP TABLESPACE is not supported, so we need to drop it manually.