Re: Nested transactions: deferred triggers - Mailing list pgsql-patches

From Tom Lane
Subject Re: Nested transactions: deferred triggers
Date
Msg-id 25252.1055385187@sss.pgh.pa.us
Whole thread Raw
In response to Re: Nested transactions: deferred triggers  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Nested transactions: deferred triggers  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-patches
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
>> Seems reasonable, but I have a stylistic gripe ...
>> I suspect you named it this way because you intend to pass it as a
>> parameter to all these routines later,

> Actually, the function itself is going to obtain it via a
> TransactionGetDeferredTriggers() call so it's going to be a variable
> local to the function.  I'm not sure if it can be made a parameter,

My thought would be that TransactionGetDeferredTriggers() ought to be
called in one place that then passes the list pointer to the other
subroutines.  I haven't looked at the code in detail to see how this
fits in ... but I don't like the notion of all these little functions
independently fetching a pointer from some nontrivial function.  That
opens you up to interesting problems if different functions manage to
fetch different results.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: CIDR addresses in pg_hba.conf
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] "Adding missing from clause" (replacement)