Hi Thom: thank you for your reply; I can't figure this one out!  Per your reply:

[victoria@victoria ~]$ pg
  [sudo -u postgres -i]
  [sudo] password for victoria:

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

postgres=# \q

[postgres@victoria ~]$ psql -af ~/.psqlrc
  /var/lib/postgres/.psqlrc: No such file or directory

[postgres@victoria ~]$ exit
  logout

[victoria@victoria ~]$

So, it appears that postgres is looking for the .psqlrc file there (does not 
exist), but ignoring my ~/.psqlrc file, right?

Edit: from that, it appears that postgres thinks that my home directory is 
/var/lib/postgres/.  ... Confirmed:

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

As a simple solution, I can sudo symlink MY ~/.psqlrc to that directory 
(/var/...; changing ownership also to postgres), but there appears to be some 
underlying issue, as Pg should find ~/.psqlrc, correct?

FYI, I installed postgresql (Arch Linux) using the "pacman" package manager; 
the only significant change I made is to define a custom data directory, on my 
home partition.

----------------------------------------
From: "Thom Brown-2 [via PostgreSQL]" <ml+s1045698n5971968...@n3.nabble.com>
Subject: Re: ~/.psqlrc file is ignored
Date: Wed, 19 Jul 2017 11:31:49 -0700 (MST)

Do you get anything with "psql -a"?

If not, what do you get when you use "psql -af ~/.psqlrc" ?

Thom




--
View this message in context: 
http://www.postgresql-archive.org/psqlrc-file-is-ignored-tp5971773p5971973.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Reply via email to