Re: Sharing data between databases

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Sharing data between databases
Date: 2011-05-13 04:05:55
Message-ID: 4DCCAE23.2080601@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/12/11 8:38 PM, Tim Uckun wrote:
>> I sometimes think it'd be nice if Pg offered the ability to translate schema
>> to "databases", so it runs with a single database and multiple schema, and
>> you "connect" to a schema, MySQL style. It'd help people who want to use
>> multiple databases on a machine and query between them, though of course
>> it'd do nothing for people who want to do inter-machine or inter-instance
>> queries.
>>
>
> That's an interesting idea. Since I am building this app from scratch
> I suppose I could create different schemas for different applications
> instead of using different databases. I wonder how rails and active
> record can deal with that. I'll take a look and see.
>
> I am presuming of course that one can query across schemas.

most certainly. just prefix any objects or fields with
schemaname.objectname. if you don't specify the schemaname it looks in
the SEARCH_PATH, which defaults to "$user",public

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2011-05-13 05:17:22 Re: Sharing data between databases
Previous Message Tim Uckun 2011-05-13 03:38:18 Re: Sharing data between databases