Re: DB alias ?

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: DB alias ?
Дата
Msg-id 20130123221759.GN7727@crankycanuck.ca
обсуждение исходный текст
Ответ на Re: DB alias ?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Список pgsql-general
On Wed, Jan 23, 2013 at 10:08:05PM +0000, Gauthier, Dave wrote:
> For each phase of a project, a new DB is created.  The project phase is identified in a linux environment variable
(letscall it $PHASE).  The DB name that is used in the connect string of the perl/DBI scripts they run is derived from
thatin the perl/DBI script, maybe something like this... $db = $ENV{PHASE}."_DB", followed by the db connect string.
  
>

It seems that this is your problem.  What you need to do is something more like

    $db = $ENV{PROJDB}."_DB" || $db = $ENV{PHASE}."_DB"

Then have (only) the people who are supposed to be working on the non-standard database name set PROJDB in their
environment,and your problem is solved.  No? 

(I have reservations about this entire thing anyway.  It feels to me you really want to be using schemas here, but
that'sa different discussion.) 

Best,

A

--
Andrew Sullivan
ajs@crankycanuck.ca


В списке pgsql-general по дате отправления:

Предыдущее
От: "Gauthier, Dave"
Дата:
Сообщение: Re: DB alias ?
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: DB alias ?