auto datetime update on UPDATE?

From: Tulassay Zsolt <zsolt(at)tek(dot)bke(dot)hu>
To: pgsql-sql(at)postgresql(dot)org
Subject: auto datetime update on UPDATE?
Date: 1999-10-31 15:45:26
Message-ID: Pine.LNX.4.10.9910311633040.26318-100000@tek.bke.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hi,

i have set up a table, where two fields (creation_dt and modification_dt)
always get the actual date/time by default when doing an INSERT.
my question is, how is it possible to let the field modification_dt
change when doing an UPDATE?
Is there a way to solve it in SQL?

(actually i found something in the mailing list archive,
where the sender solves the problem by creating a trigger
and a C function, but i would really apppreciate if there was
a solution in SQL only.
anyway, that solution is at
http://www.PostgreSQL.ORG/mhonarc/pgsql-sql/1998-06/msg00056.html )

Zsolt Tulassay

ps i'm not on the mailing list so please send a copy to my address
as well. thanks

Browse pgsql-sql by date

  From Date Subject
Next Message Tulassay Zsolt 1999-10-31 15:54:50 auto datetime update on UPDATE?
Previous Message Bruce Momjian 1999-10-31 13:18:31 Re: [SQL] Decimal precsion?