From: | vstuart <mail(at)VictoriasJourney(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: ~/.psqlrc file is ignored |
Date: | 2017-07-19 19:12:05 |
Message-ID: | 20170719121152.52fae1ca@VictoriasJourney.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi David: I see what you are saying; sorry for the confusion. This is how postgres operates on my system:
[victoria(at)victoria ~]$ echo $HOME
/home/victoria
[victoria(at)victoria ~]$ which postgres
/usr/bin/postgres
[victoria(at)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(at)victoria ~]$ psql
psql: FATAL: database "victoria" does not exist
[victoria(at)victoria ~]$ sudo -u postgres -i
[postgres(at)victoria ~]$ echo $HOME
/var/lib/postgres
[postgres(at)victoria ~]$ psql
psql (9.6.3)
Type "help" for help.
postgres=# \q
[postgres(at)victoria ~]$ exit
logout
[victoria(at)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: http://www.postgresql-archive.org/psqlrc-file-is-ignored-tp5971773p5971984.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2017-07-19 19:21:54 | Re: ~/.psqlrc file is ignored |
Previous Message | David G. Johnston | 2017-07-19 19:02:52 | Re: ~/.psqlrc file is ignored |