Search Postgresql Archives

Re: output inserted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Peter Kroon
Sent: Wednesday, November 21, 2012 8:41 AM
To: pgsql-general@xxxxxxxxxxxxxx
Subject: 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.

 

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux