PL/pgSQL : notion of deferred execution - Mailing list pgsql-general

From Frank van Vugt
Subject PL/pgSQL : notion of deferred execution
Date
Msg-id 200512111631.59211.ftm.van.vugt@foxi.nl
Whole thread Raw
Responses Re: PL/pgSQL : notion of deferred execution
List pgsql-general
L.S.

I'd like to prevent updates on a specific field when done during regular use
or during the execution of any non-deferred trigger, while allowing them when
done from deferred triggers. (BTW, we're talking version 8.1 here).

Currently there doesn't seem to be a way to know whether code is executed
during a regular trigger call or during a deferred trigger call? I.e.
something in the line of TG_WHEN and a bit more to the point then looking
whether TG_ARGV[] contains the deferred keywords.....

So, am I overlooking a way to get to this info? And if not, could this be
considered an item for the todo list?


Ratio: when deferred triggers on table A are used to calculate field values of
table B (which then obviously need an update), one might want to prevent
direct updates on these fields of table B



--
Best,




Frank.

pgsql-general by date:

Previous
From: William Yu
Date:
Subject: Re: Performance large tables.
Next
From: Bruno Wolff III
Date:
Subject: Re: Performance large tables.