Re: Trigger, record "old" is not assigned yet

Поиск
Список
Период
Сортировка
От Aaron Bono
Тема Re: Trigger, record "old" is not assigned yet
Дата
Msg-id bf05e51c0607132034x59497ac9h185c19d6a9c9f33c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Trigger, record "old" is not assigned yet  (Adrian Klaver <aklaver@comcast.net>)
Список pgsql-sql
On 7/13/06, Adrian Klaver <aklaver@comcast.net> wrote:
For plpgsql use TG_OP. See link below.
http://www.postgresql.org/docs/8.1/interactive/plpgsql-trigger.html
On Thursday 13 July 2006 03:50 pm, Daniel Caune wrote:
> Hi,
>
>
>
> I've created a trigger BEFORE INSERT OR UPDATE on a table and, indeed,
> when the trigger is raised before insertion the record "old" is not
> assigned.  Is there a way to distinguish in the trigger procedure from
> an insert statement to an update statement?
>
>
>
> Regards,
>
>
> Daniel CAUNE
>
> Ubisoft Online Technology
>
> (514) 490 2040 ext. 3613

--
Adrian Klaver
aklaver@comcast.net

Or to be more specific:

IF (TG_OP = 'UPDATE') THEN

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
==================================================================

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Trigger, record "old" is not assigned yet
Следующее
От: Joost Kraaijeveld
Дата:
Сообщение: Can I do this smarter?