Re: Compressing the AFTER TRIGGER queue

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Compressing the AFTER TRIGGER queue
Дата
Msg-id 4E3A5AFC020000250003FA46@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Compressing the AFTER TRIGGER queue  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Compressing the AFTER TRIGGER queue  (Jim Nasby <jim@nasby.net>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Aug 3, 2011 at 6:05 PM, Jim Nasby <jim@nasby.net> wrote:
>> Not sure how much this relates to this discussion, but I have
>> often wished we had AFTER FOR EACH STATEMENT triggers that
>> provided OLD and NEW recordsets you could make use of. Sometimes
>> it's very valuably to be able to look at *all* the rows that
>> changed in a transaction in one shot.
> 
> Yeah, that would be awesome.  I think some of our competitors
> provide exactly that feature...
If I remember correctly, MS SQL Server and Sybase ASE provide
INSERTED and DELETED relations in triggers instead of NEW and OLD
records.  In a FOR EACH ROW trigger the relation contains only one
row.
This is related to the thread on BEFORE triggers, in that these
products require that you UPDATE the row in the base table to modify
it (normally by joining to the INSERTED relation), making the latest
values available to other trigger code, and providing a clear
distinction between the values coming in to the trigger and the
latest values in the database.
-Kevin


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: TRUE/FALSE vs true/false
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https