OLD in Trigger - Mailing list pgsql-hackers

From Bernie Warner
Subject OLD in Trigger
Date
Msg-id 613AB3D69FEDD2118BEA0090271BEE8A09F61E@jfdisbs01.JFDIDOMAIN
Whole thread Raw
List 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.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: handling NULLS in GiST
Next
From: "Sanath Peiris"
Date:
Subject: PGSQL problem with weblogic and OID data type