Re: access to original-statement predicates in an INSTEAD-OF row trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Lumby <johnlumby(at)hotmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: access to original-statement predicates in an INSTEAD-OF row trigger
Date: 2019-11-16 15:37:13
Message-ID: 29541.1573918633@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John Lumby <johnlumby(at)hotmail(dot)com> writes:
> How can a row trigger access the original SQL statement at the root of
> the current operation?

It can't; at least not in any way that'd be reliable or maintainable.

I concur with the upthread recommendation that switching to serializable
mode would be a more manageable way of dealing with concurrent-update
problems.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2019-11-16 15:45:28 Re: Function performance degrades after repeated execution
Previous Message Pavel Stehule 2019-11-16 15:35:58 Re: Function performance degrades after repeated execution