Select from multiple db's

Started by Aaron Holtzover 26 years ago2 messagesgeneral
Jump to latest
#1Aaron Holtz
aholtz@bright.net

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."
--------------------------------------------------------------------------

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Aaron Holtz (#1)
Re: [GENERAL] Select from multiple db's

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.