Re: How to change the default database for a user

Поиск
Список
Период
Сортировка
Искать
От
Alexander Farber
Тема
Re: How to change the default database for a user
Дата
Msg-id
943abd910601301053t2d47d44ajd70138335946f6e1@mail.gmail.com
Ответ на
Список
Дерево обсуждения
How to change the default database for a user Alexander Farber <alexander.farber@gmail.com>
Re: How to change the default database for a user Doug McNaught <doug@mcnaught.org>
Re: How to change the default database for a user Alexander Farber <alexander.farber@gmail.com>
Re: How to change the default database for a user Doug McNaught <doug@mcnaught.org>
Re: How to change the default database for a user Alexander Farber <alexander.farber@gmail.com>
Argh, I had "phpbb" in my env ( ~/.login) too:

setenv  PGDATA          /var/postgresql/data
setenv  PGDATABASE      phpbb
setenv  PGHOST          /var/www/tmp
setenv  PGUSER          phpbb

Now everything makes sense (I was thinking
about some kind of system table for default databases).

Sorry and thank you for your help

Regards
Alex


On 1/30/06, Doug McNaught  wrote:
> I was talking about the name of the database, not the user name in the
> database.  The former defaults to the same as your Unix username
> (e.g. if I log in as 'doug' psql will try to connect me to a database
> called 'doug' if I don't supply a database name).  The PGDATABASE
> environment variable overrides this.  Are you sure it's not set?
>
> Anyway, you should always supply the database name explicitly when you
> connect--it's a lot safer.
В списке pgsql-general по дате отправления
От: Doug McNaught
Дата:
От: Peter Eisentraut
Дата:
FAQ