OLD in Triggers

From: Bernie Warner <Bernie_W(at)jfdi-tech(dot)com>
To: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: OLD in Triggers
Date: 2001-07-16 12:07:26
Message-ID: 613AB3D69FEDD2118BEA0090271BEE8A09F621@jfdisbs01.JFDIDOMAIN
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Can anyone confirm whether I can do something like the following in a
PL/pgsql trigger ( on table tab_a )

SELECT INTO tab_b * FROM OLD;

or do I have to do -

INSERT INTO tab_b SELECT * FROM tab_a WHERE id=OLD.id;

All that I want to do is insert the records from OLD into a 2nd table.

Any advice would be gratefully received.

Bernie Warner
JFDI Technology Ltd.

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2001-07-16 12:36:14 NetBSD 1.5.1(HP300)
Previous Message Bernie Warner 2001-07-16 10:28:30 OLD in Trigger