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

From Julian Mehnle
Subject Re: "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc
Date
Msg-id 201005151614.37533.julian@mehnle.net
Whole thread Raw
In response to Re: "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

Attachment

pgsql-general by date:

Previous
From: Vincenzo Romano
Date:
Subject: R: index or not
Next
From: sunpeng
Date:
Subject: how to get Point * from datum =heap_getattr(....)?