Re: Issue with psqlrc with command line.

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Issue with psqlrc with command line.
Дата
Msg-id CAKFQuwYuL4GAHDcmK0kEg0HO1YcG_dt8QW1fXfmLwHE8WDG-Yw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Issue with psqlrc with command line.  (saurabh shelar <saurabhshelar5@gmail.com>)
Ответы Re: Issue with psqlrc with command line.  (saurabh shelar <saurabhshelar5@gmail.com>)
Список pgsql-general
On Wed, Aug 29, 2018 at 8:31 AM, saurabh shelar <saurabhshelar5@gmail.com> wrote:
Hi David,

Thank you for the help.

I was just got confused with the below line mentioned in the document. However, it seems it is still the same behaviour (i.e --no-psqlrc).

"Before PostgreSQL 9.6, the -c option implied -X (--no-psqlrc); this is no longer the case."

Whether psqlrc is being processed or not is immaterial to the behavior you are seeing because -c will not resolve the variable reference prior to sending the command to the server.

If you have other non-variable definitions in psqlrc that could affect the -c command (or its output - like \pset instructions) those will now be applied before sending the command whereas before they would not be.

(admittedly I'm not reading the source code nor have experimented to draw this conclusion)

David J.

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

Предыдущее
От: saurabh shelar
Дата:
Сообщение: Re: Issue with psqlrc with command line.
Следующее
От: Dave Peticolas
Дата:
Сообщение: Re: WAL replay issue from 9.6.8 to 9.6.10