Re: return data before the update

From: Luis Silva <lfs12(at)hotmail(dot)com>
To: <akretschmer(at)spamfence(dot)net>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: return data before the update
Date: 2010-01-10 23:44:17
Message-ID: COL108-W61269DD2AFF204E7755381B56E0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Thanks for the quick replay.
I wanted to return it when doing the update query.

> Date: Sat, 9 Jan 2010 07:47:32 +0100
> From: akretschmer(at)spamfence(dot)net
> To: pgsql-novice(at)postgresql(dot)org
> Subject: Re: [NOVICE] return data before the update
>
> Luis Silva <lfs12(at)hotmail(dot)com> wrote:
>
> > Hi all,
> > Is it possible to perform an update and return the old data, i.e., the data
> > updated? Do I need a store procedure?
>
> What do you want to do with the old data? Store i a other table (like a
> log-table)?
>
> I think, you needs a TRIGGER, and the TRIGGER has to store the old
> values in your log-table.
>
> Do you know tablelog?
> http://andreas.scherbaum.la/blog/archives/100-Log-Table-Changes-in-PostgreSQL-with-tablelog.html
>
>
> Andreas
> --
> Really, I'm not out to destroy Microsoft. That will just be a completely
> unintentional side effect. (Linus Torvalds)
> "If I was god, I would recompile penguin with --enable-fly." (unknown)
> Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice

_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/196390708/direct/01/

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Nathaniel Trellice 2010-01-11 10:11:54 Cursor names
Previous Message Andreas Kretschmer 2010-01-09 06:47:32 Re: return data before the update