John Lumby 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
On 11/15/19 17:38, Adrian Klaver wrote:
> On 11/15/19 1:54 PM, John Lumby wrote:
>> Adrian Klaver wrote :
>>>
>> We need to run with Read Committed.
>>
>> I am looking for a solution which does not alter the application or
>> overall behaviour,
>> but just addresses detecting which predicates to a
On 11/15/19 1:54 PM, John Lumby wrote:
Adrian Klaver wrote :
Seems you are looking for Serializable Isolation Level:
True , that would solve the race condition, but it is too drastic.
We need to run with Read Committed.
I am looking for a solution which does not alter the application or
Adrian Klaver wrote :
>
> Seems you are looking for Serializable Isolation Level:
>
True , that would solve the race condition, but it is too drastic.
We need to run with Read Committed.
I am looking for a solution which does not alter the application or overall
behaviour,
but just addresses
On 11/15/19 12:57 PM, John Lumby wrote:
Adrian Klaver wrote :
On 11/15/19 10:37 AM, John Lumby wrote:
Suppose the original statement is
UPDATE myview VW set VW.counter = 11 where VW.primary_key = and
VW.counter = 10;
and my trigger constructs this statement
UPDATE basetab
Adrian Klaver wrote :
>
> On 11/15/19 10:37 AM, John Lumby wrote:
>
> > Suppose the original statement is
>
> > UPDATE myview VW set VW.counter = 11 where VW.primary_key = and
> > VW.counter = 10;
>
> > and my trigger constructs this statement
>
> > UPDATE basetable BT set BT.counte
On 11/15/19 10:37 AM, John Lumby wrote:
I have an INSTEAD-OF row trigger one of whose purposes is to re-direct the
original statement
(which is operating on a VIEW) to a different real base table.
Suppose the original statement is
UPDATE myview VW set VW.counter = 11 where VW.primary
I have an INSTEAD-OF row trigger one of whose purposes is to re-direct the
original statement
(which is operating on a VIEW) to a different real base table.
Suppose the original statement is
UPDATE myview VW set VW.counter = 11 where VW.primary_key = and
AND VW.counter = 10;
an