Re: "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc

Поиск
Список
Период
Сортировка
От Julian Mehnle
Тема Re: "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc
Дата
Msg-id 201005151614.37533.julian@mehnle.net
обсуждение исходный текст
Ответ на Re: "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:

> Julian Mehnle <julian@mehnle.net> writes:
> > Can anyone confirm that --variable command-line options are evaluated
> > before .psqlrc is read and executed?  If so, does anyone know the
> > rationale for that?  It seems counterintuitive to me, as it makes
> > overriding variables from the command-line impossible.
>
> Seems entirely intuitive to me, as we can certainly not process .psqlrc
> before processing the command line options (one of them might be -X for
> instance).

Well, OK, that may be true for -X and certain others, but not necessarily
for --variable.

> Furthermore, changing it would likely break existing applications.

Fair enough.  Any comments on my other points and questions, Tom?

-Julian

Вложения

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

Предыдущее
От: Vincenzo Romano
Дата:
Сообщение: R: index or not
Следующее
От: sunpeng
Дата:
Сообщение: how to get Point * from datum =heap_getattr(....)?