Re: [GENERAL] ~/.psqlrc file is ignored

Поиск
Список
Период
Сортировка
От vstuart
Тема Re: [GENERAL] ~/.psqlrc file is ignored
Дата
Msg-id 20170719121152.52fae1ca@VictoriasJourney.com
обсуждение исходный текст
Ответ на Re: [GENERAL] ~/.psqlrc file is ignored  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: [GENERAL] ~/.psqlrc file is ignored
Re: [GENERAL] ~/.psqlrc file is ignored [solved: $HOME/.psqlrc]
Re: [GENERAL] ~/.psqlrc file is ignored
Список pgsql-general
Hi David: I see what you are saying; sorry for the confusion. This is how postgres operates on my system:

[victoria@victoria ~]$ echo $HOME
  /home/victoria

[victoria@victoria ~]$ which postgres
  /usr/bin/postgres

[victoria@victoria ~]$ postgres
  postgres does not know where to find the server configuration file.
  You must specify the --config-file or -D invocation option or set the PGDATA environment variable.

[victoria@victoria ~]$ psql
  psql: FATAL:  database "victoria" does not exist

[victoria@victoria ~]$ sudo -u postgres -i

[postgres@victoria ~]$ echo $HOME
  /var/lib/postgres

[postgres@victoria ~]$ psql
  psql (9.6.3)
  Type "help" for help.

postgres=# \q

[postgres@victoria ~]$ exit
  logout

[victoria@victoria ~]$

... That postgres had a different $HOME environment than mine was not apparent to me, when I posted this question.

> What does "your" ~/.psqlrc have to do with any of this?  If you are
> executing psql while masquarding at the postgres user its the postgres
> user's​ ~/.psqlrc file that will be looked for.

> Typically one doesn't execute psql as the postgres user.  They configure
> the system so that they can execute psql as a regular user.  You should
> probably do that and then everything should work like you are thinking.


View this message in context: Re: ~/.psqlrc file is ignored
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] ~/.psqlrc file is ignored
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] ~/.psqlrc file is ignored