Re: Multiple TRIGGERs and OLD versus NEW "records"

Поиск
Список
Период
Сортировка
От Jorge Godoy
Тема Re: Multiple TRIGGERs and OLD versus NEW "records"
Дата
Msg-id 871wjrk5c8.fsf@gmail.com
обсуждение исходный текст
Ответ на Re: Multiple TRIGGERs and OLD versus NEW "records"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Jorge Godoy <jgodoy@gmail.com> writes:
>> If I change some column -- e.g. fill in some automatic calculated column or a
>> timestamp column --, when I run the second trigger will OLD be the data stored
>> at the database already or will it be affected by the NEW data returned from
>> the previous trigger?
>
> OLD is the data actually in the database.  NEW is the currently proposed row.
> So prior triggers can change what you see as NEW, but not OLD.
>
>             regards, tom lane

Thanks, Tom.  It's like I supposed.  I was going to test it tonight when I get
to my office but you saved me from that :-)



--
Jorge Godoy      <jgodoy@gmail.com>

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

Предыдущее
От: Randall Smith
Дата:
Сообщение: pre-parser query manipulation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to write a function that manipulates a set of results