mirror of https://github.com/citusdata/citus.git
Merge 2e463d6c40
into 30bf960c5c
commit
211275a1fb
|
@ -938,11 +938,14 @@ citus_ProcessUtilityInternal(PlannedStmt *pstmt,
|
|||
if (ops && ops->markDistributed)
|
||||
{
|
||||
List *addresses = GetObjectAddressListFromParseTree(parsetree, false, true);
|
||||
ObjectAddress *address = NULL;
|
||||
foreach_ptr(address, addresses)
|
||||
if (!IsAnyObjectDistributed(addresses))
|
||||
{
|
||||
MarkObjectDistributed(address);
|
||||
TrackPropagatedObject(address);
|
||||
ObjectAddress *address = NULL;
|
||||
foreach_ptr(address, addresses)
|
||||
{
|
||||
MarkObjectDistributed(address);
|
||||
TrackPropagatedObject(address);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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: citus_internal_access
|
||||
test: function_with_case_when
|
||||
test: non_super_user_create_existing_extension
|
||||
|
||||
# Causal clock test
|
||||
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