Re: Understanding Schema's - Mailing list pgsql-general

From Jasen Betts
Subject Re: Understanding Schema's
Date
Msg-id if10e1$ru1$1@reversiblemaps.ath.cx
Whole thread Raw
In response to Understanding Schema's  (Carlos Mennens <carlos.mennens@gmail.com>)
List pgsql-general
On 2010-12-15, Carlos Mennens <carlos.mennens@gmail.com> wrote:
> On Tue, Dec 14, 2010 at 7:17 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
>> You can cross query a schema but not a database.
>>
>> So you can create:
>>
>> create table fire.foo()
>> create table ice.foo()
>>
>> And they are isolated from each other physically and logically but you
>> can query them both:
>>
>> SELECT fire.*, ice.* join on (id)
>
> Why would anyone in a random scenario want to have independent
> schema's to cross query? I'm just trying to see how this would be
> useful in any scenario.

Suppose you're an ISP and want to run a mailserver using your user
database for athentications and dbmail for storage and also run
and a RADIUS server to authenticate your users.  You can put your user
list in one schema and put the freeradius tables in another but
substitute the freeradius user list with a view which references the
main userlist, then put dbmail in a third  with another view pointing
back to your userlist Your billing software could be in yet another schema.
etc...


Or perhaps you have a partitioned logging table that changes frequently
and you want to exclude it from backups,  if you put it in a separate
schema it can be easily excluded, else you'd have to liste the approx 100
partition tables for exclusion each time...





--
⚂⚃ 100% natural

pgsql-general by date:

Previous
From: Stephen Cook
Date:
Subject: Re: How to calculate length of path data without diagonals?
Next
From: Jasen Betts
Date:
Subject: Re: Understanding Schema's