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

cannot use result of (insert .. returning)

From: "dvs" <dvs(at)fon(dot)kamchatka(dot)ru>
To: <pgsql-ru-general(at)postgresql(dot)org>
Subject: cannot use result of (insert .. returning)
Date: 2008-05-29 06:14:19
Message-ID: 01ae01c8c153$3b40fbe0$0e09a8c0@dvs (view raw or flat)
Thread:
Lists: pgsql-ru-general
Hello,

I need to use query like:
    select (insert into test (a) values (x) returning b),...
but it say
    ERROR: syntax error at or near "into"

Is this a bug?

Function does not work too:
  create function(..) returning .. as 'insert ... returning ..' language 
'sql'
ERROR:...
DETAIL: Function's final statement must be a SELECT.

any ideas?

dvs


pgsql-ru-general by date

Next:From: apmDate: 2008-05-31 05:38:53
Subject: Не используется индекс в запросе.
Previous:From: pronix pronixDate: 2008-05-20 13:40:28
Subject: ограничение пользователя постгреса

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