Re: Can't SELECT from (INSERT ... RETURNING)

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Nico Sabbi" <nsabbi(at)officinedigitali(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can't SELECT from (INSERT ... RETURNING)
Date: 2007-07-19 00:20:48
Message-ID: b42b73150707181720n505259ebgac3e80dbe0df8e81@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/18/07, Nico Sabbi <nsabbi(at)officinedigitali(dot)it> wrote:
> I thought I could use the output of INSERT...RETURNING as a set of
> tuples for a subquery,
> but it seems it's not the case:
>
> nb1=# select * from (insert into m(a) values(112) returning a);
> ERROR: syntax error at or near "into"
> LINE 1: select * from (insert into m(a) values(112) returni...
> ^
>
> Is this a bug or it's not even supposed to work in theory?
> Such a feature would be extremely useful to have.

it's on the TODO. It's a frequently requested feature. It's more
complicated than it looks on the surface.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message marcelo Cortez 2007-07-19 01:00:45 tsearch2 on postgres8.2.4
Previous Message Brijesh Shrivastav 2007-07-19 00:01:10 Can someone shed some light on following error: "pg_tblspc/16763/16764/PG_VERSION" is missing