Re: Copy entire row on elete

From: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
To: josue(at)lamundial(dot)hn (=?ISO-8859-1?Q?Josu=E9_Maldonado?=)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Copy entire row on elete
Date: 2004-05-06 21:45:36
Message-ID: 200405062145.i46LjbGn016358@gw.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I use triggers with plpgsql, now I have a situation I have to copy the
> entire tuple of a table before it gets deleted to another table. I
> wonder if is there a way to say:

If you have a unique key you could do the following:

INSERT into C select * from old_table where key = OLD.key.
--
Mike Nolan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josué Maldonado 2004-05-06 21:46:56 Re: Copy entire row on elete
Previous Message Joshua D. Drake 2004-05-06 21:44:21 Re: 7.2 or 7.4 for critical data?