@ -2783,12 +2783,11 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi
|
||||
#else
|
||||
PreventTransactionChain(is_top_level, "CREATE TABLESPACE");
|
||||
CreateTableSpace((CreateTableSpaceStmt*)parse_tree);
|
||||
|
||||
#endif
|
||||
break;
|
||||
|
||||
case T_DropTableSpaceStmt:
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
if (IS_PGXC_COORDINATOR && !IsConnFromCoord())
|
||||
PreventTransactionChain(is_top_level, "DROP TABLESPACE");
|
||||
/* Allow this to be run inside transaction block on remote nodes */
|
||||
|
@ -129,5 +129,10 @@ drop tablespace relativeTbs2;
|
||||
|
||||
DROP SCHEMA testschema CASCADE;
|
||||
|
||||
-- Fail, cannot run inside a transaction block
|
||||
begin;
|
||||
drop tablespace testspace;
|
||||
end;
|
||||
|
||||
-- Should succeed
|
||||
DROP TABLESPACE testspace;
|
||||
|
@ -259,5 +259,10 @@ NOTICE: drop cascades to 3 other objects
|
||||
DETAIL: drop cascades to table testschema.foo
|
||||
drop cascades to table testschema.asselect
|
||||
drop cascades to table testschema.atable
|
||||
-- Fail, cannot run inside a transaction block
|
||||
begin;
|
||||
drop tablespace testspace;
|
||||
ERROR: DROP TABLESPACE cannot run inside a transaction block
|
||||
end;
|
||||
-- Should succeed
|
||||
DROP TABLESPACE testspace;
|
||||
|
Reference in New Issue
Block a user