pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tulassay Zsolt <zsolt@tek.bke.hu>
To: pgsql-sql@postgresql.org
Subject: auto datetime update on UPDATE?
Date: Sun, 31 Oct 1999 16:45:26 +0100 (CET)
Message-ID: <Pine.LNX.4.10.9910311633040.26318-100000@tek.bke.hu> (raw)


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





view thread (4+ messages)  latest in thread

Message-ID: <Pine.LNX.4.10.9910311633040.26318-100000@tek.bke.hu>
Permalink:  ../Pine.LNX.4.10.9910311633040.26318-100000@tek.bke.hu/
Also on:    postgresql.org/message-id/Pine.LNX.4.10.9910311633040.26318-100000@tek.bke.hu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: zsolt@tek.bke.hu
  Subject: Re: auto datetime update on UPDATE?
  In-Reply-To: <Pine.LNX.4.10.9910311633040.26318-100000@tek.bke.hu>
  References: <Pine.LNX.4.10.9910311633040.26318-100000@tek.bke.hu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox