Re: app table names - Mailing list pgsql-general

From Justin Graf
Subject Re: app table names
Date
Msg-id 4B9FF753.5060507@magwerks.com
Whole thread Raw
In response to Re: app table names  (Vick Khera <vivek@khera.org>)
Responses Re: app table names  (Vick Khera <vivek@khera.org>)
List pgsql-general
On 3/16/2010 3:35 PM, Vick Khera wrote:
> On Tue, Mar 16, 2010 at 3:03 PM, Jamie Kahgee<jamie.kahgee@gmail.com>  wrote:
>
>> I'm curious what people consider best practice (or how do you do it)  to
>> help ensure these name collisions don't happen.
>>
> Do not mix data from multiple applications in one database. Use
> multiple databases to isolate them entirely.
>
>
That's not always a practical solution to the problem,

the Apps may need to share numerous tables, duplicating the data and
keeping it sync can be a pain. Having to open numerous database
connections to different databases is a resource hog .

what i have been doing of late is defining PG_SCHEMA variable  to tell
the app where the data is located .  Common tables to many apps go into
the public schema or a schema that's in the search path.    Selects look
something like this

"Select * from " + PG_SCHEMA + "foo"



All legitimate Magwerks Corporation quotations are sent in a .PDF file attachment with a unique ID number generated by
ourproprietary quotation system. Quotations received via any other form of communication will not be honored. 

CONFIDENTIALITY NOTICE: This e-mail, including attachments, may contain legally privileged, confidential or other
informationproprietary to Magwerks Corporation and is intended solely for the use of the individual to whom it
addresses.If the reader of this e-mail is not the intended recipient or authorized agent, the reader is hereby notified
thatany unauthorized viewing, dissemination, distribution or copying of this e-mail is strictly prohibited. If you have
receivedthis e-mail in error, please notify the sender by replying to this message and destroy all occurrences of this
e-mailimmediately. 
Thank you.


pgsql-general by date:

Previous
From: Vick Khera
Date:
Subject: Re: app table names
Next
From: fsfeel
Date:
Subject: Result order of Insert ... returning