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

Re: function accessing other db

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Marcus Andree S(dot) Magalhaes" <marcus(dot)magalhaes(at)vlinfo(dot)com(dot)br>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: function accessing other db
Date: 2004-02-12 15:36:02
Message-ID: 20040212153602.GB4001@wolff.to (view raw or flat)
Thread:
Lists: pgsql-novice
On Thu, Feb 12, 2004 at 11:43:11 -0200,
  "Marcus Andree S. Magalhaes" <marcus(dot)magalhaes(at)vlinfo(dot)com(dot)br> wrote:
> 
> Hello everyone,
> 
> We have to copy some data from one table to another table in other database.
> 
> Is there any way to do this from inside a custom plpgsql function, with no
> external applications, interfaces or storage?

You can do something like:

INSERT INTO tablea (col1, col2, col3) SELECT col1, col2, col3 FROM tableb;

In response to

Responses

pgsql-novice by date

Next:From: Marcus Andree S. MagalhaesDate: 2004-02-12 15:41:21
Subject: Re: function accessing other db
Previous:From: CoLDate: 2004-02-12 14:10:35
Subject: Re: function accessing other db

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