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

From Tom Lane
Subject Re: "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc
Date
Msg-id 11280.1273874110@sss.pgh.pa.us
Whole thread Raw
In response to "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc  (Julian Mehnle <julian@mehnle.net>)
Responses Re: "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc  (Julian Mehnle <julian@mehnle.net>)
List pgsql-general
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).  Furthermore, changing it would likely break existing
applications.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Persistence problem
Next
From: "I. B."
Date:
Subject: Re: Persistence problem