Re: [PATCHES] Work-in-progress referential action trigger timing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] Work-in-progress referential action trigger timing
Date: 2005-09-09 14:50:27
Message-ID: 10560.1126277427@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> Is there a case other than a before trigger updating a row we will want to
> act upon later in the statement where we'll get a row with xmax of our
> transaction and cmax greater than the current command?

The greater-cmax case could occur via any kind of function, not only a
trigger, ie

update tab set x = foo(x) where ...

where foo() is a volatile function that internally updates the tab
table.

I suppose you could say that this is horrible programming practice and
anyone who tries it deserves whatever weird behavior ensues ... but
it's not the case that every such situation involves a trigger.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2005-09-09 15:46:03 Re: [PATCHES] Work-in-progress referential action trigger
Previous Message Stephan Szabo 2005-09-09 14:36:15 Re: [PATCHES] Work-in-progress referential action trigger

Browse pgsql-patches by date

  From Date Subject
Next Message Stephan Szabo 2005-09-09 15:46:03 Re: [PATCHES] Work-in-progress referential action trigger
Previous Message Stephan Szabo 2005-09-09 14:36:15 Re: [PATCHES] Work-in-progress referential action trigger