Re: about EDITOR_LINENUMBER_SWITCH - Mailing list pgsql-hackers

From Tom Lane
Subject Re: about EDITOR_LINENUMBER_SWITCH
Date
Msg-id 15667.1306271477@sss.pgh.pa.us
Whole thread Raw
In response to Re: about EDITOR_LINENUMBER_SWITCH  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: about EDITOR_LINENUMBER_SWITCH  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, May 24, 2011 at 4:36 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
>>> That's an intriguing possibility.  But part of the point of the
>>> original feature was to be able to say:
>>> 
>>> \ef somefunc 10
>>> 
>>> ...and end up on line 10 of somefunc, perhaps in response to an error
>>> message complaining about that line.  I don't think your proposal
>>> would address that.

>> Well, you'd write
>> 
>> \ef somefunc +10
>> 
>> instead.

> But that would not put you on line 10 of the function.

Right.  It would also increase the cognitive load on the user to have
to remember the command-line go-to-line-number switch for his editor.
So I don't particularly want to redesign this feature.  However, I can
see the possible value of letting EDITOR_LINENUMBER_SWITCH be set from
the same place that you set EDITOR, which would suggest that we allow
the value to come from an environment variable.  I'm not sure whether
there is merit in allowing both that source and ~/.psqlrc, though
possibly for Windows users it might be easier if ~/.psqlrc worked.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: 9.2 schedule
Next
From: Tom Lane
Date:
Subject: Re: minor patch submission: CREATE CAST ... AS EXPLICIT