Skip to content

Commit a20e49b

Browse files
committed
Avoid using IsTransactionBlock() in DeferredTriggerSetState(); no real
need for this optimization, and it's too easily fooled anyway.
1 parent e16f04c commit a20e49b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/backend/commands/trigger.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.135 2002/10/14 16:51:29 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.136 2002/10/21 19:55:49 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1991,11 +1991,9 @@ DeferredTriggerSetState(ConstraintsSetStmt *stmt)
19911991
List *l;
19921992

19931993
/*
1994-
* If called outside a transaction block, we can safely return: this
1995-
* command cannot effect any subsequent transactions, and there are no
1996-
* "session-level" trigger settings.
1994+
* Ignore call if we aren't in a transaction.
19971995
*/
1998-
if (!IsTransactionBlock())
1996+
if (deftrig_cxt == NULL)
19991997
return;
20001998

20011999
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy