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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Thu, 29 May 2008 19:14:19 +1300
  • Message-id: <01ae01c8c153$3b40fbe0$0e09a8c0@dvs> <text/plain>

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




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group