Search Postgresql Archives

Re: ~/.psqlrc file is ignored

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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]" <[hidden email]>
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: Re: ~/.psqlrc file is ignored
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux