From: | vstuart <mail(at)VictoriasJourney(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: ~/.psqlrc file is ignored [solved: $HOME/.psqlrc] |
Date: | 2017-07-20 15:37:02 |
Message-ID: | 1500565022977-5972146.post@n3.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
'Solution,' for anyone else encountering this issue (Arch Linux PostgreSQL
install ...).
TLDR: symlink ~/.psqlrc to postgres $HOME/.psqlrc
-----------------------------------------------------
[victoria(at)victoria ~]$ echo $HOME
/home/victoria
[victoria(at)victoria ~]$ ls -la .psq*
-rw-r--r-- 1 victoria victoria 3.9K Jul 17 10:42 .psqlrc
[victoria(at)victoria ~]$ pg
[sudo -u postgres -i]
[sudo] password for victoria:
[postgres(at)victoria ~]$ echo $HOME
/var/lib/postgres
[postgres(at)victoria ~]$ ln -s /home/victoria/.psqlrc /var/lib/postgres/
[postgres(at)victoria ~]$ ls -la .psqlrc
lrwxrwxrwx 1 postgres postgres 22 Jul 20 08:10 .psqlrc ->
/home/victoria/.psqlrc
[postgres(at)victoria ~]$ psql
psql:/var/lib/postgres/.psqlrc:14: invalid command \SET
Pager usage is off.
Null display is "[NULL]".
Timing is on.
Expanded display is used automatically.
psql (9.6.3)
Type "help" for help.
[local] postgres(at)postgres=# \q
## EDITED /home/victoria/.psqlrc in text editor, correcting line 14 error:
## " \SET client_encoding = 'UTF8' " >> " \set CLIENT_ENCODING = 'UTF8' "
## ('\set' needed to be lowercase)
[postgres(at)victoria ~]$ psql
Pager usage is off.
Null display is "[NULL]".
Timing is on.
Expanded display is used automatically.
psql (9.6.3)
Type "help" for help.
[local] postgres(at)postgres=# \q
[postgres(at)victoria ~]$ exit
logout
[victoria(at)victoria ~]$
--
View this message in context: http://www.postgresql-archive.org/psqlrc-file-is-ignored-tp5971773p5972146.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2017-07-20 15:49:37 | Re: ~/.psqlrc file is ignored [solved: $HOME/.psqlrc] |
Previous Message | Tom Lane | 2017-07-20 13:40:19 | Re: _page_cost parameter with values < 1 |