Re: cannot use result of (insert..returning)

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, dvs <dvs(at)fon(dot)kamchatka(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: cannot use result of (insert..returning)
Date: 2008-06-12 01:14:57
Message-ID: 48507891.9020807@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> Heikki Linnakangas wrote:
>
>> dvs wrote:
>>
>>> Hello,
>>>
>>> I need to use query like:
>>> select (insert into test (a) values (x) returning b),c from anytable
>>> where condition
>>> but it say
>>> ERROR: syntax error at or near "into"
>>>
>>> Is this a bug?
>>>
>> No, it's a known limitation.
>>
>
> Is there a TODO item for this? I don't see one, do you?
>
>
Allow INSERT/UPDATE ... RETURNING inside a SELECT 'FROM' clause

http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php
http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php

?

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Denne 2008-06-12 01:26:20 Re: Proposal: Multiversion page api (inplace upgrade)
Previous Message Tom Lane 2008-06-12 01:02:20 Re: Overhauling GUCS