Thread: Select from multiple db's

Select from multiple db's

From
Aaron Holtz
Date:
Is it possible with postgres to do a select from tables contained in
separate databases?   I have two separate db's that are maintained, but
would like to make a select from one of them to insert the data into the
second one.  Any thoughts on how to make this work would be appreciated.
Merging the two db's won't be anything easy, so I'm looking for a way for
this type of query to be valid.

--------------------------------------------------------------------------
Aaron Holtz
ComNet Inc.
UNIX Systems Specialist
Email:  aholtz@bright.net
"It's not broken, it just lacks duct tape."
--------------------------------------------------------------------------



Re: [GENERAL] Select from multiple db's

From
Peter Eisentraut
Date:
On Wed, 14 Jul 1999, Aaron Holtz wrote:

> Is it possible with postgres to do a select from tables contained in
> separate databases?   I have two separate db's that are maintained, but
> would like to make a select from one of them to insert the data into the
> second one.  Any thoughts on how to make this work would be appreciated.
> Merging the two db's won't be anything easy, so I'm looking for a way for
> this type of query to be valid.

The best way to do this would probably be to dump and restore. You can
restrict the dump to tables, and this thing could flow rather
automatically.

--
Peter Eisentraut
PathWay Computing, Inc.