Re: Accessing 2 different databases in the same query ? - Mailing list pgsql-general

From Richard Huxton
Subject Re: Accessing 2 different databases in the same query ?
Date
Msg-id 200306021232.29405.dev@archonet.com
Whole thread Raw
In response to Re: Accessing 2 different databases in the same query ?  (Nagib Abi Fadel <nagib_postgres@yahoo.com>)
List pgsql-general
On Monday 02 Jun 2003 9:39 am, Nagib Abi Fadel wrote:
> From what i read dblink let's us access another database in the same query
> ... Which is great. But does it slow down the query ??

Don't use it myself, but from discussion on the lists, I'd say "probably" -
don't see how it could be otherwise. You'll want to test.

> And what about making references between tables (creating foreign keys) is
> it possible ?????

Nope - just not practical. You could bring both servers to a grinding halt
very quickly trying to keep track of FKs over a network link.

Incidentally, if you don't need the two databases on different machines,
perhaps look at using schemas to separate users - that would let you have FKs
etc.

--
  Richard Huxton

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: ERROR: CreateTrigger: function.....
Next
From: Darko Prenosil
Date:
Subject: Re: Accessing 2 different databases in the same query ?