Re: Refer to another database - Mailing list pgsql-general

From Andreas Kalsch
Subject Re: Refer to another database
Date
Msg-id 4A77ABC9.2070108@gmx.de
Whole thread Raw
In response to Re: Refer to another database  (David Fetter <david@fetter.org>)
Responses Re: Refer to another database  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Refer to another database  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Will it decrease performance to refer to other schemas?


David Fetter schrieb:
> On Tue, Aug 04, 2009 at 04:41:51AM +0200, Andreas Kalsch wrote:
>
>> How is it possible to refer to another database, like:
>>
>> select * from otherDatabase.nodes;
>>
>
> Generally, you use schemas for this.  Schemas are just namespaces
> inside the one database.
>
>
>> I have read something about schemas and I have simply created an own
>> schema for every database with the same name, but it still does not
>> work. Is there anything plain and simple?
>>
>
> SELECT f.one, b.two
> FROM
>     one_schema.foo AS f
> JOIN
>     other_schema.bar AS b
> ON (f.id = b.foo_id)
> WHERE...
>
> Cheers,
> David.
>


pgsql-general by date:

Previous
From: David Fetter
Date:
Subject: Re: Refer to another database
Next
From: Tom Lane
Date:
Subject: Re: Refer to another database