Search Postgresql Archives

Re: dblink (INSERT ..... RETURNING)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/20/12 12:20 AM, P. Broennimann wrote:

I need now to insert a record in that remote table and get back the new primary field (autoincrement sequence).

Since "bdlink_exec" can not give back rows I tried to use "dblink", but I can not figure out how to format that INSERT... RETURNING query?


INSERT iNTO tablename (cols) VALUES (stuff) RETURNING currval('sequencename');



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux