Search Postgresql Archives

Re: app table names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 16, 2010 at 1:03 PM, Jamie Kahgee <jamie.kahgee@xxxxxxxxx> wrote:
> My company has a handful of apps that we deploy in the websites we build.
>  Recently a very old app needed to be included along side a newer app and
> there was a conflict w/ a duplicate table name needed to be used by both
> apps.
> We are now in the process of updating an old app and there will be some DB
> updates.  I'm curious what people consider best practice (or how do you do
> it)  to help ensure these name collisions don't happen.
> I've looked at schema's but not sure if thats the right path we want to
> take.  As the documentation prescribes, I don't want to "wire" a particular
> schema name into an application and if I add schema's to the user search
> path how would it know which table I was referring to if two schema's have
> the same table name.  although, maybe I'm reading to much into this.
> Any insights or words of wisdom would be greatly appreciated!

When you have two tables with the same name in different schemas, the
one that matches the firs schema in the search path wins.

I would definitely use schemas to separate out apps here.  If it
doesn't need to see a schema, then leave it out of that user's (app as
a user that is) search path.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux