Returning old value on update - Mailing list pgsql-general

From Gerhard Heift
Subject Returning old value on update
Date
Msg-id 20090131130312.GA3728@gheift
Whole thread Raw
List pgsql-general
Hello,

is it possible to get the old value of an update, something like this:

INSERT INTO my_table (col) VALUES (2);

UPDATE my_table SET col = 4 RETURNING old.col;

Should give me the 2.

Regards,
  Gerhard

Attachment

pgsql-general by date:

Previous
From: Roger Leigh
Date:
Subject: Re: Pet Peeves?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Pet Peeves?