pull/7641/merge
copetol 2025-02-27 05:38:05 +01:00 committed by GitHub
commit 211275a1fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 52 additions and 4 deletions

View File

@ -938,6 +938,8 @@ citus_ProcessUtilityInternal(PlannedStmt *pstmt,
if (ops && ops->markDistributed)
{
List *addresses = GetObjectAddressListFromParseTree(parsetree, false, true);
if (!IsAnyObjectDistributed(addresses))
{
ObjectAddress *address = NULL;
foreach_ptr(address, addresses)
{
@ -947,6 +949,7 @@ citus_ProcessUtilityInternal(PlannedStmt *pstmt,
}
}
}
}
/*

View File

@ -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;

View File

@ -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

View File

@ -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;