Skip site navigation (1) Skip section navigation (2)

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

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "dvs" <dvs(at)fon(dot)kamchatka(dot)ru>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cannot use result of (insert..returning)
Date: 2008-06-04 12:22:58
Message-ID: 48468922.9030108@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-hackers by date

Next:From: Decibel!Date: 2008-06-04 12:35:04
Subject: Re: intercepting WAL writes
Previous:From: Heikki LinnakangasDate: 2008-06-04 11:19:42
Subject: Re: Core team statement on replication in PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group