Hello,
I know nothing about triggers so I need a little hand-holding here. I'm
taking an Oracle script and converting it to pgsql. One of the things
that the Oracle database supports is a trigger on dates. So there are two
fields in the table, CREATION_DATE and UPDATE_DATE.
In the CREAT TABLE statement, I can set both dates using DEFAULT (once I
figure out how to get today's date in). But hoiw would I write a trigger
that changes the update_date to use the current time? Basically, I guess
it would be
create trigger date_update before update on mytable
for each statement execut procedure [procedure that inserts a date
for me in the update_date column]
So what would I be doing for the portion in brackets?
Thanks,
L
--
Laurent Duperval <mailto:[EMAIL PROTECTED]>
Les plus vigoureux coups de main au destin n'aboutissent pas toujours dans la
vie, aux démarrages qu'on attendait.
-Alambic Talon
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html