output inserted

From: Peter Kroon <plakroon(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: output inserted
Date: 2012-11-21 13:41:24
Message-ID: CAOh+DOnbiSVXYP-BLJfPD73u-QnsxrLMtWX8_L7m9hPJyGNRog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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;

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2012-11-21 13:42:53 Re: Escaping regexp special characters in field value
Previous Message Albe Laurenz 2012-11-21 13:34:25 Re: ERROR: volatile EquivalenceClass has no sortref