Re: dblink / Insert several records into remote table

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: "P(dot) Broennimann" <peter(dot)broennimann(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: dblink / Insert several records into remote table
Date: 2013-08-06 00:30:21
Message-ID: CAB7nPqTmHXBStPg8ucE62sH6u32BaTNVMSNEWnv7RmAjKMoROg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 5, 2013 at 6:22 PM, P. Broennimann
<peter(dot)broennimann(at)gmail(dot)com> wrote:
> Hello
>
> I'd like to use dblink to insert records (several) from a local table to a
> remote table. Is it possible to do this in one statement? Something like:
>
> insert into <remotetable> select col1, col2, col3 from <localtable>
dblink_exec can be of a certain help in this case. Documentation
provides a couple of examples:
http://www.postgresql.org/docs/9.2/static/contrib-dblink-exec.html
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message ascot.moss@gmail.com 2013-08-06 02:44:00 pg_stat_replication became empty suddenly
Previous Message immersive.excel@gmail.com 2013-08-06 00:24:49 Re: Seamless replacement to MySQL's GROUP_CONCAT function...