mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Issue error on SET outside transaction block in some cases
Issue error for SET LOCAL/CONSTRAINTS/TRANSACTION outside a transaction block, as they have no effect. Per suggestion from Morten Hustveit
This commit is contained in:
@@ -688,7 +688,7 @@ standard_ProcessUtility(Node *parsetree,
|
||||
break;
|
||||
|
||||
case T_VariableSetStmt:
|
||||
ExecSetVariableStmt((VariableSetStmt *) parsetree);
|
||||
ExecSetVariableStmt((VariableSetStmt *) parsetree, isTopLevel);
|
||||
break;
|
||||
|
||||
case T_VariableShowStmt:
|
||||
@@ -754,6 +754,7 @@ standard_ProcessUtility(Node *parsetree,
|
||||
break;
|
||||
|
||||
case T_ConstraintsSetStmt:
|
||||
RequireTransactionChain(isTopLevel, "SET CONSTRAINTS");
|
||||
AfterTriggerSetState((ConstraintsSetStmt *) parsetree);
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user