David Fetter <david@fetter.org> writes:
> On Mon, Aug 02, 2010 at 11:34:02PM -0400, Robert Haas wrote:
>> A side question is whether this should be an environment variable or
>> a psql variable.
> I'd say "yes." As with $EDITOR/PSQL_EDITOR, there should be something
> that looks for an overriding psql variable, drops through to look for
> an environment variable, and then to a sane default, for some
> reasonable value of "sane." Perhaps this default could depend on OS
> (Windows vs. Everything Else) to start with.
Well, the thing about $EDITOR is that it's a very-widely-understood
convention. This one won't be, so the argument for making it an
environment variable seems pretty thin. It'd be saner to set it in
your ~/.psqlrc file than to add another few nanoseconds to every
process launch you ever do.
regards, tom lane