diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-10-21 19:55:49 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-10-21 19:55:49 +0000 |
commit | a20e49bea82712e803f133dc81716bc4220df496 (patch) | |
tree | 218548db7a123c052e641f999518c25dccdbc66a /src | |
parent | e16f04cf72d7000e1b97e500fcbb4a94013ed139 (diff) | |
download | postgresql-a20e49bea82712e803f133dc81716bc4220df496.tar.gz postgresql-a20e49bea82712e803f133dc81716bc4220df496.zip |
Avoid using IsTransactionBlock() in DeferredTriggerSetState(); no real
need for this optimization, and it's too easily fooled anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/commands/trigger.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index b404bc3dc51..efac061948f 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.135 2002/10/14 16:51:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.136 2002/10/21 19:55:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1991,11 +1991,9 @@ DeferredTriggerSetState(ConstraintsSetStmt *stmt) List *l; /* - * If called outside a transaction block, we can safely return: this - * command cannot effect any subsequent transactions, and there are no - * "session-level" trigger settings. + * Ignore call if we aren't in a transaction. */ - if (!IsTransactionBlock()) + if (deftrig_cxt == NULL) return; /* |