@@ -453,13 +453,13 @@ standard_ProcessUtility(PlannedStmt *pstmt,
453453 break ;
454454
455455 case TRANS_STMT_COMMIT_PREPARED :
456- PreventTransactionChain (isTopLevel , "COMMIT PREPARED" );
456+ PreventInTransactionBlock (isTopLevel , "COMMIT PREPARED" );
457457 PreventCommandDuringRecovery ("COMMIT PREPARED" );
458458 FinishPreparedTransaction (stmt -> gid , true);
459459 break ;
460460
461461 case TRANS_STMT_ROLLBACK_PREPARED :
462- PreventTransactionChain (isTopLevel , "ROLLBACK PREPARED" );
462+ PreventInTransactionBlock (isTopLevel , "ROLLBACK PREPARED" );
463463 PreventCommandDuringRecovery ("ROLLBACK PREPARED" );
464464 FinishPreparedTransaction (stmt -> gid , false);
465465 break ;
@@ -473,7 +473,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
473473 ListCell * cell ;
474474 char * name = NULL ;
475475
476- RequireTransactionChain (isTopLevel , "SAVEPOINT" );
476+ RequireTransactionBlock (isTopLevel , "SAVEPOINT" );
477477
478478 foreach (cell , stmt -> options )
479479 {
@@ -490,12 +490,12 @@ standard_ProcessUtility(PlannedStmt *pstmt,
490490 break ;
491491
492492 case TRANS_STMT_RELEASE :
493- RequireTransactionChain (isTopLevel , "RELEASE SAVEPOINT" );
493+ RequireTransactionBlock (isTopLevel , "RELEASE SAVEPOINT" );
494494 ReleaseSavepoint (stmt -> options );
495495 break ;
496496
497497 case TRANS_STMT_ROLLBACK_TO :
498- RequireTransactionChain (isTopLevel , "ROLLBACK TO SAVEPOINT" );
498+ RequireTransactionBlock (isTopLevel , "ROLLBACK TO SAVEPOINT" );
499499 RollbackToSavepoint (stmt -> options );
500500
501501 /*
@@ -536,13 +536,13 @@ standard_ProcessUtility(PlannedStmt *pstmt,
536536
537537 case T_CreateTableSpaceStmt :
538538 /* no event triggers for global objects */
539- PreventTransactionChain (isTopLevel , "CREATE TABLESPACE" );
539+ PreventInTransactionBlock (isTopLevel , "CREATE TABLESPACE" );
540540 CreateTableSpace ((CreateTableSpaceStmt * ) parsetree );
541541 break ;
542542
543543 case T_DropTableSpaceStmt :
544544 /* no event triggers for global objects */
545- PreventTransactionChain (isTopLevel , "DROP TABLESPACE" );
545+ PreventInTransactionBlock (isTopLevel , "DROP TABLESPACE" );
546546 DropTableSpace ((DropTableSpaceStmt * ) parsetree );
547547 break ;
548548
@@ -592,7 +592,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
592592
593593 case T_CreatedbStmt :
594594 /* no event triggers for global objects */
595- PreventTransactionChain (isTopLevel , "CREATE DATABASE" );
595+ PreventInTransactionBlock (isTopLevel , "CREATE DATABASE" );
596596 createdb (pstate , (CreatedbStmt * ) parsetree );
597597 break ;
598598
@@ -611,7 +611,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
611611 DropdbStmt * stmt = (DropdbStmt * ) parsetree ;
612612
613613 /* no event triggers for global objects */
614- PreventTransactionChain (isTopLevel , "DROP DATABASE" );
614+ PreventInTransactionBlock (isTopLevel , "DROP DATABASE" );
615615 dropdb (stmt -> dbname , stmt -> missing_ok );
616616 }
617617 break ;
@@ -690,7 +690,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
690690 break ;
691691
692692 case T_AlterSystemStmt :
693- PreventTransactionChain (isTopLevel , "ALTER SYSTEM" );
693+ PreventInTransactionBlock (isTopLevel , "ALTER SYSTEM" );
694694 AlterSystemSetConfigFile ((AlterSystemStmt * ) parsetree );
695695 break ;
696696
@@ -756,13 +756,13 @@ standard_ProcessUtility(PlannedStmt *pstmt,
756756 * Since the lock would just get dropped immediately, LOCK TABLE
757757 * outside a transaction block is presumed to be user error.
758758 */
759- RequireTransactionChain (isTopLevel , "LOCK TABLE" );
759+ RequireTransactionBlock (isTopLevel , "LOCK TABLE" );
760760 /* forbidden in parallel mode due to CommandIsReadOnly */
761761 LockTableCommand ((LockStmt * ) parsetree );
762762 break ;
763763
764764 case T_ConstraintsSetStmt :
765- WarnNoTransactionChain (isTopLevel , "SET CONSTRAINTS" );
765+ WarnNoTransactionBlock (isTopLevel , "SET CONSTRAINTS" );
766766 AfterTriggerSetState ((ConstraintsSetStmt * ) parsetree );
767767 break ;
768768
@@ -808,7 +808,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
808808 * start-transaction-command calls would not have the
809809 * intended effect!
810810 */
811- PreventTransactionChain (isTopLevel ,
811+ PreventInTransactionBlock (isTopLevel ,
812812 (stmt -> kind == REINDEX_OBJECT_SCHEMA ) ? "REINDEX SCHEMA" :
813813 (stmt -> kind == REINDEX_OBJECT_SYSTEM ) ? "REINDEX SYSTEM" :
814814 "REINDEX DATABASE" );
@@ -1307,7 +1307,7 @@ ProcessUtilitySlow(ParseState *pstate,
13071307 List * inheritors = NIL ;
13081308
13091309 if (stmt -> concurrent )
1310- PreventTransactionChain (isTopLevel ,
1310+ PreventInTransactionBlock (isTopLevel ,
13111311 "CREATE INDEX CONCURRENTLY" );
13121312
13131313 /*
@@ -1715,7 +1715,7 @@ ExecDropStmt(DropStmt *stmt, bool isTopLevel)
17151715 {
17161716 case OBJECT_INDEX :
17171717 if (stmt -> concurrent )
1718- PreventTransactionChain (isTopLevel ,
1718+ PreventInTransactionBlock (isTopLevel ,
17191719 "DROP INDEX CONCURRENTLY" );
17201720 /* fall through */
17211721
0 commit comments