Re: function accessing other db - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: function accessing other db
Date
Msg-id 20040212153602.GB4001@wolff.to
Whole thread Raw
In response to function accessing other db  ("Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br>)
Responses Re: function accessing other db  ("Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br>)
List pgsql-novice
On Thu, Feb 12, 2004 at 11:43:11 -0200,
  "Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.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;

pgsql-novice by date:

Previous
From: "Marcus Andree S. Magalhaes"
Date:
Subject: function accessing other db
Next
From: "Marcus Andree S. Magalhaes"
Date:
Subject: Re: function accessing other db