From: | "Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar(dot)Pyatalo(at)honeywell(dot)com> |
---|---|
To: | Tomasz Myrta <jasiek(at)klaster(dot)net>, "Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar(dot)Pyatalo(at)honeywell(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Triggers - need help !!! |
Date: | 2004-07-07 08:48:42 |
Message-ID: | 77ED2BF75D59D1439F90412CC5B109740E8A2E38@ie10-sahara.hiso.honeywell.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Thanks a lot for ur help.
In the trigger, I am checking if a field is updated or not. The syntax I
use is
IF UPDATE(CreateTime) THEN
....
....
END IF;
Is this syntax correct.
-----Original Message-----
From: Tomasz Myrta [mailto:jasiek(at)klaster(dot)net]
Sent: Wednesday, July 07, 2004 12:50 PM
To: Pradeepkumar, Pyatalo (IE10)
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Triggers - need help !!!
On 2004-07-07 08:45, Użytkownik Pradeepkumar, Pyatalo (IE10) napisał:
> Hi,
>
> I am writing some triggers for my project.
> I am writing a trigger on a table after delete....I want to know how u
refer
> to the row that is being deleted.
>
> For example for a trigger function after INSERT/UPDATE u refer to the row
> being inserted/updated using NEW like this....
Use OLD instead of NEW.
You can also use OLD inside UPDATE triggers - you have access to row
before update.
Regards,
Tomasz Myrta
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2004-07-07 11:03:45 | Re: Triggers - need help !!! |
Previous Message | Tomasz Myrta | 2004-07-07 07:20:26 | Re: Triggers - need help !!! |