Re: Nested transactions: deferred triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Nested transactions: deferred triggers
Date: 2003-06-12 02:33:07
Message-ID: 25252.1055385187@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-06-12 02:34:15 Re: [HACKERS] "Adding missing from clause" (replacement)
Previous Message Bruce Momjian 2003-06-12 02:15:26 Re: pygresql build/install problems: use setup.py?