Thread: Accessing multiple Databases at the same time

Accessing multiple Databases at the same time

From
"Lucas, Fred"
Date:

Hi,
  Is there a way to SELECT tables or create JOINs from multiple databases through psql?
I have read through Mr. Momjian's book and looked at the online documentation and cannot find a reference to it.

I have been using the "USE" statement in MS SQL Server 7.0. 
Is there a similar equivalency in Postgresql or would this have to be handled programmatically with multiple database connections?

Thanks in advance for any help on this...

Fred Lucas

Re: Accessing multiple Databases at the same time

From
Rene Pijlman
Date:
On Mon, 20 Aug 2001 16:08:31 -0600, you wrote:
>Is there a way to SELECT tables or create JOINs from multiple databases
>through psql? [...] would this have to be handled programmatically with
>multiple database connections?

Yes, you need multiple connections for that.

By the way, if you really meant "psql" you're on the wrong list.
This list is about Java DataBase Connectivity (JDBC).

Regards,
René Pijlman

Re: Accessing multiple Databases at the same time

From
"Nick Fankhauser"
Date:
Fred Lucas wrote:
>Is there a way to SELECT tables or create JOINs from multiple databases
>through psql? [...] would this have to be handled programmatically with
>multiple database connections?

Then Rene Pijlman wrote:
>Yes, you need multiple connections for that.

And now Nick writes:
Can you really do this?! that would be great! how is it done? I understand
accessing multiple databases, but I can't figure out how I would do a JOIN
across them.

-Nick


---------------------------------------------------------------------
Nick Fankhauser

    nickf@doxpop.com  Phone 1.765.965.7363  Fax 1.765.962.9788
doxpop - Court records at your fingertips - http://www.doxpop.com/


Re: Re: Accessing multiple Databases at the same time

From
Rene Pijlman
Date:
[join tables in different databases]
>Can you really do this?! that would be great! how is it done? I understand
>accessing multiple databases, but I can't figure out how I would do a JOIN
>across them.

Apparently you are actually awake when you read this list, I
wasn't :-)

OTOH, if the PostgreSQL engine can do, so can you...

Regards,
René Pijlman