From: | "David Johnston" <polobo(at)yahoo(dot)com> |
---|---|
To: | "'Peter Kroon'" <plakroon(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: output inserted |
Date: | 2012-11-21 13:50:09 |
Message-ID: | 024d01cdc7ef$1f38cde0$5daa69a0$@yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Peter Kroon
Sent: Wednesday, November 21, 2012 8:41 AM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] output inserted
How to I output the insert in PostgreSQL?
DROP TABLE IF EXISTS a_001;
CREATE TEMP TABLE a_001(
vl text
);
DROP TABLE IF EXISTS a_002;
CREATE TEMP TABLE a_002(
vl text
);
INSERT INTO a_001
OUTPUT INSERTED.* INTO a_002 --mssql
SELECT 'text for insertion';
SELECT vl FROM a_002;
My best guess, since I can only infer what that particular syntax means, is
that you have to put an AFTER INSERT TRIGGER on table a_001.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2012-11-21 13:55:12 | Re: ERROR: volatile EquivalenceClass has no sortref |
Previous Message | Ryan Kelly | 2012-11-21 13:45:26 | Re: output inserted |