mirror of https://github.com/citusdata/citus.git
Merge 2e463d6c40
into 30bf960c5c
commit
211275a1fb
|
@ -938,6 +938,8 @@ citus_ProcessUtilityInternal(PlannedStmt *pstmt,
|
||||||
if (ops && ops->markDistributed)
|
if (ops && ops->markDistributed)
|
||||||
{
|
{
|
||||||
List *addresses = GetObjectAddressListFromParseTree(parsetree, false, true);
|
List *addresses = GetObjectAddressListFromParseTree(parsetree, false, true);
|
||||||
|
if (!IsAnyObjectDistributed(addresses))
|
||||||
|
{
|
||||||
ObjectAddress *address = NULL;
|
ObjectAddress *address = NULL;
|
||||||
foreach_ptr(address, addresses)
|
foreach_ptr(address, addresses)
|
||||||
{
|
{
|
||||||
|
@ -947,6 +949,7 @@ citus_ProcessUtilityInternal(PlannedStmt *pstmt,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
CREATE SCHEMA non_super_user_create_existing_extension;
|
||||||
|
SET search_path TO non_super_user_create_existing_extension;
|
||||||
|
SELECT CURRENT_USER;
|
||||||
|
current_user
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
postgres
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
CREATE EXTENSION if not exists "uuid-ossp" SCHEMA public;
|
||||||
|
CREATE EXTENSION if not exists "uuid-ossp" SCHEMA public;
|
||||||
|
NOTICE: extension "uuid-ossp" already exists, skipping
|
||||||
|
CREATE USER non_super_user_ext;
|
||||||
|
SET ROLE non_super_user_ext;
|
||||||
|
SELECT CURRENT_USER;
|
||||||
|
current_user
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
non_super_user_ext
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
CREATE EXTENSION if not exists "uuid-ossp" SCHEMA public;
|
||||||
|
NOTICE: extension "uuid-ossp" already exists, skipping
|
||||||
|
RESET ROLE;
|
||||||
|
SELECT CURRENT_USER;
|
||||||
|
current_user
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
postgres
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
DROP USER non_super_user_ext;
|
||||||
|
DROP SCHEMA non_super_user_create_existing_extension CASCADE;
|
|
@ -110,6 +110,7 @@ test: run_command_on_all_nodes
|
||||||
test: background_task_queue_monitor
|
test: background_task_queue_monitor
|
||||||
test: citus_internal_access
|
test: citus_internal_access
|
||||||
test: function_with_case_when
|
test: function_with_case_when
|
||||||
|
test: non_super_user_create_existing_extension
|
||||||
|
|
||||||
# Causal clock test
|
# Causal clock test
|
||||||
test: clock
|
test: clock
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
CREATE SCHEMA non_super_user_create_existing_extension;
|
||||||
|
SET search_path TO non_super_user_create_existing_extension;
|
||||||
|
|
||||||
|
SELECT CURRENT_USER;
|
||||||
|
CREATE EXTENSION if not exists "uuid-ossp" SCHEMA public;
|
||||||
|
CREATE EXTENSION if not exists "uuid-ossp" SCHEMA public;
|
||||||
|
CREATE USER non_super_user_ext;
|
||||||
|
SET ROLE non_super_user_ext;
|
||||||
|
SELECT CURRENT_USER;
|
||||||
|
CREATE EXTENSION if not exists "uuid-ossp" SCHEMA public;
|
||||||
|
RESET ROLE;
|
||||||
|
SELECT CURRENT_USER;
|
||||||
|
DROP USER non_super_user_ext;
|
||||||
|
DROP SCHEMA non_super_user_create_existing_extension CASCADE;
|
Loading…
Reference in New Issue