Skip to content

Commit f82d4d6

Browse files
committed
Slightly correct context check for event triggers
The previous check for a "complete query" omitted the new PROCESS_UTILITY_QUERY_NONATOMIC value. This didn't actually make a difference in practice, because only CALL and SET from PL/pgSQL run in this state, but it's more correct to include it anyway. Discussion: https://www.postgresql.org/message-id/4566041d-2567-74d2-d135-19ff6a20fe51%402ndquadrant.com
1 parent ae30786 commit f82d4d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/tcop/utility.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ ProcessUtilitySlow(ParseState *pstate,
943943
{
944944
Node *parsetree = pstmt->utilityStmt;
945945
bool isTopLevel = (context == PROCESS_UTILITY_TOPLEVEL);
946-
bool isCompleteQuery = (context <= PROCESS_UTILITY_QUERY);
946+
bool isCompleteQuery = (context != PROCESS_UTILITY_SUBCOMMAND);
947947
bool needCleanup;
948948
bool commandCollected = false;
949949
ObjectAddress address;

0 commit comments

Comments
 (0)