On 7/15/05, sunithab@travelpost.com <sunithab@travelpost.com> wrote:
[snip]
>
> Anybody know what is the syntax I have to use in update statement.
>
>
>
> CREATE TRIGGER "trg_update_note_updated_date" AFTER UPDATE
> ON "property"."note" FOR EACH ROW
> EXECUTE PROCEDURE
> "property"."update_note_updated_date_trg"();
>
>
> CREATE OR REPLACE FUNCTION
> "property"."update_note_updated_date_trg" () RETURNS
> trigger AS
> $body$
> begin
> /* New function body */
NEW.updated_date = NOW();
RETURN NEW;
> end;
> $body$
> LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
See http://www.postgresql.org/docs/8.0/interactive/plpgsql-trigger.html
--
Mike Rylander
mrylander@gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org