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:11:17
Message-ID: 15667.1306271477@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 Tue, May 24, 2011 at 4:36 PM, Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-05-24 21:13:11 Re: minor patch submission: CREATE CAST ... AS EXPLICIT
Previous Message Peter Eisentraut 2011-05-24 21:03:41 Re: 9.2 schedule