Re: about EDITOR_LINENUMBER_SWITCH

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: about EDITOR_LINENUMBER_SWITCH
Date: 2011-05-24 21:35:24
Message-ID: 16070.1306272924@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Sat, May 21, 2011 at 5:47 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>> I noticed the 9.1 release notes claim that the new
>> EDITOR_LINENUMBER_SWITCH thing is an environment variable, whereas it is
>> actually a psql variable.
>> This is perhaps sort of a Freudian slip.

> It's probably the result of drift between the original patch and what
> was eventually committed. IIRC, Pavel had it as an environment
> variable originally, but Tom and I didn't feel the feature was
> important enough to merit that treatment.

BTW, the above is merest historical revisionism: there was never a
version of the patch that did it that way. AFAICS the idea started
here:
http://archives.postgresql.org/pgsql-hackers/2010-08/msg00089.php
to which you immediately asked whether it should be an environmental
variable, and I said no on what might be considered thin grounds:
http://archives.postgresql.org/pgsql-hackers/2010-08/msg00182.php

I can't see any real objection other than complexity to having it look
for a psql variable and then an environment variable. Or we could drop
the psql variable part of that, if it seems too complicated.

Also, while we're on the subject, I'm not real sure why we don't allow
the code to provide a default value when EDITOR has a well-known value
like "vi" or "emacs". As long as there is a way to override that,
where's the harm in a default?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-05-24 21:51:38 Re: about EDITOR_LINENUMBER_SWITCH
Previous Message Tom Lane 2011-05-24 21:13:11 Re: minor patch submission: CREATE CAST ... AS EXPLICIT