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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Julian Mehnle <julian(at)mehnle(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc
Date: 2010-05-14 21:55:10
Message-ID: 11280.1273874110@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Julian Mehnle <julian(at)mehnle(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message I. B. 2010-05-14 22:08:22 Re: Persistence problem
Previous Message Tom Lane 2010-05-14 21:32:49 Re: Persistence problem