Re: app table names

From: Justin Graf <justin(at)magwerks(dot)com>
To: Vick Khera <vivek(at)khera(dot)org>
Cc: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: app table names
Date: 2010-03-16 21:25:39
Message-ID: 4B9FF753.5060507@magwerks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/16/2010 3:35 PM, Vick Khera wrote:
> On Tue, Mar 16, 2010 at 3:03 PM, Jamie Kahgee<jamie(dot)kahgee(at)gmail(dot)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 our proprietary 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 information proprietary 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 that any unauthorized viewing, dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and destroy all occurrences of this e-mail immediately.
Thank you.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message fsfeel 2010-03-16 23:08:38 Result order of Insert ... returning
Previous Message Vick Khera 2010-03-16 20:35:19 Re: app table names