Thread: Select from two databases

Select from two databases

From
"Becky Alcorn"
Date:
Hi,

I was wondering if there has been any further development on running SQL
statements involving more than one database?  We are porting a database from
SQLServer to Postgres and some queries in related applications use joins on
tables that are in different databases.  We know we can modify the code to
use dblink to accomplish much the same thing in Postgres.  Does anyone know
of a more elegant solution for Postgres than dblink?

Regards
Becky

Becky Alcorn
Unisolve Pty Ltd - Melbourne, Australia
+61 3 9568 2005

This line intentionally left blank.



Re: Select from two databases

From
Richard Huxton
Date:
On Thursday 22 April 2004 08:00, Becky Alcorn wrote:
> Hi,
>
> I was wondering if there has been any further development on running SQL
> statements involving more than one database?  We are porting a database
> from SQLServer to Postgres and some queries in related applications use
> joins on tables that are in different databases.  We know we can modify the
> code to use dblink to accomplish much the same thing in Postgres.  Does
> anyone know of a more elegant solution for Postgres than dblink?

The standard response to this is to suggest using schemas. Any reason why this 
won't work in your case?

--  Richard Huxton Archonet Ltd