From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCHES] Work-in-progress referential action trigger |
Date: | 2005-09-09 15:46:03 |
Message-ID: | 20050909084154.E35722@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Fri, 9 Sep 2005, Tom Lane wrote:
> 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 *thought* I was missing a case, I just couldn't figure out what.
> 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.
Well, the change I was thinking of would have made it an error if foo(x)
updated a row that was then later selected by the update rather than the
current behavior which I think would have ignored the already updated row,
so that's probably not going to work.
From | Date | Subject | |
---|---|---|---|
Next Message | AgentM | 2005-09-09 15:47:10 | Re: R: Rendezvous/Bonjour broken in 8.1 beta |
Previous Message | Tom Lane | 2005-09-09 14:50:27 | Re: [PATCHES] Work-in-progress referential action trigger timing |
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2005-09-09 21:58:26 | Caveat for Domains |
Previous Message | Tom Lane | 2005-09-09 14:50:27 | Re: [PATCHES] Work-in-progress referential action trigger timing |