Lets say I have a table temp123 as
Column | Type | Modifiers
------------+-------------------+------------------------
id | integer | not null default nextval('temp12_id_seq'::regclass)
description | character varying |
I would like to combine the ID returned by
INSERT INTO temp123 (description)
VALUES ('TESTING') RETURNING ID;
with a `SELECT'. For example (doesn't work):
SELECT 23, x.*
FROM (INSERT INTO temp123 (description)
VALUES ('TESTING') RETURNING id ) AS x;
PostgreSQL v9.0.2