Re: dblink (INSERT ..... RETURNING) - Mailing list pgsql-general

From John R Pierce
Subject Re: dblink (INSERT ..... RETURNING)
Date
Msg-id 4F1926BA.5030405@hogranch.com
Whole thread Raw
In response to dblink (INSERT ..... RETURNING)  ("P. Broennimann" <peter@enovatiq.com>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Florian Weimer
Date:
Subject: Re: On duplicate ignore
Next
From: "Prodan, Andrei"
Date:
Subject: Timestamp with time zone 'negative' problem