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

Поиск
Список
Период
Сортировка
От vstuart
Тема Re: [GENERAL] ~/.psqlrc file is ignored [solved: $HOME/.psqlrc]
Дата
Msg-id 1500565022977-5972146.post@n3.nabble.com
обсуждение исходный текст
Ответ на Re: [GENERAL] ~/.psqlrc file is ignored  (vstuart <mail@VictoriasJourney.com>)
Ответы Re: [GENERAL] ~/.psqlrc file is ignored [solved: $HOME/.psqlrc]
Список pgsql-general
'Solution,' for anyone else encountering this issue (Arch Linux PostgreSQL
install ...).

TLDR: symlink ~/.psqlrc to  postgres $HOME/.psqlrc

-----------------------------------------------------

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

[victoria@victoria ~]$ ls -la .psq*
    -rw-r--r-- 1 victoria victoria 3.9K Jul 17 10:42 .psqlrc

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

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

[postgres@victoria ~]$ ln -s  /home/victoria/.psqlrc  /var/lib/postgres/

[postgres@victoria ~]$ ls -la .psqlrc
    lrwxrwxrwx 1 postgres postgres 22 Jul 20 08:10 .psqlrc ->
/home/victoria/.psqlrc

[postgres@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@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@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@postgres=# \q

[postgres@victoria ~]$ exit
    logout

[victoria@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.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] _page_cost parameter with values < 1
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] ~/.psqlrc file is ignored [solved: $HOME/.psqlrc]