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

From: Julian Mehnle <julian(at)mehnle(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: "--variable foo=bar" vs. "\set foo quux" in ~/.psqlrc
Date: 2010-05-15 16:14:32
Message-ID: 201005151614.37533.julian@mehnle.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

> 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).

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message sunpeng 2010-05-15 17:01:13 how to get Point * from datum =heap_getattr(....)?
Previous Message Vincenzo Romano 2010-05-15 14:25:46 R: index or not