mirror of https://github.com/citusdata/citus.git
Fixes pre review check results
parent
49b1f9a095
commit
63e3738f46
|
@ -73,7 +73,7 @@ static char * GetTablespaceName(Oid tablespaceOid);
|
|||
static ObjectAddress * GetDatabaseAddressFromDatabaseName(char *databaseName, bool
|
||||
missingOk);
|
||||
|
||||
static Oid get_database_owner(Oid db_oid);
|
||||
static Oid get_database_owner(Oid dbId);
|
||||
|
||||
|
||||
/* controlled via GUC */
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "utils/builtins.h"
|
||||
|
||||
#include "commands/defrem.h"
|
||||
#include "distributed/deparser.h"
|
||||
#include "distributed/commands.h"
|
||||
#include "distributed/citus_ruleutils.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
|
||||
AppendAlterDatabaseOwnerStmt(StringInfo buf, AlterOwnerStmt *stmt)
|
||||
{
|
||||
|
|
|
@ -244,10 +244,7 @@ extern List * DropDatabaseStmtObjectAddress(Node *node, bool missingOk,
|
|||
extern List * CreateDatabaseStmtObjectAddress(Node *node, bool missingOk,
|
||||
bool isPostprocess);
|
||||
extern List * GenerateGrantDatabaseCommandList(void);
|
||||
|
||||
|
||||
extern List * PostprocessAlterDatabaseRenameStmt(Node *node, const char *queryString);
|
||||
|
||||
extern void EnsureSupportedCreateDatabaseCommand(CreatedbStmt *stmt);
|
||||
extern char * CreateDatabaseDDLCommand(Oid dbId);
|
||||
|
||||
|
|
|
@ -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;
|
||||
DROP DATABASE test_db;
|
||||
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
|
||||
-- DROP TABLESPACE is not supported, so we need to drop it manually.
|
||||
SELECT result FROM run_command_on_all_nodes(
|
||||
|
|
|
@ -536,6 +536,14 @@ REVOKE CONNECT ON DATABASE test_db FROM propagated_role;
|
|||
DROP DATABASE test_db;
|
||||
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
|
||||
|
||||
-- DROP TABLESPACE is not supported, so we need to drop it manually.
|
||||
|
|
Loading…
Reference in New Issue