Re: about EDITOR_LINENUMBER_SWITCH - Mailing list pgsql-hackers

From Robert Haas
Subject Re: about EDITOR_LINENUMBER_SWITCH
Date
Msg-id BANLkTintzY6GXL-QWcAhCBMjiSmS9XS=yQ@mail.gmail.com
Whole thread Raw
In response to about EDITOR_LINENUMBER_SWITCH  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: about EDITOR_LINENUMBER_SWITCH  (Peter Eisentraut <peter_e@gmx.net>)
Re: about EDITOR_LINENUMBER_SWITCH  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, May 21, 2011 at 5:47 PM, Peter Eisentraut <peter_e@gmx.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.  Since the editor itself is
> configured using an environment variable, shouldn't any configuration
> about the editor also be an environment variable, so people can
> configure them together?

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.

> Another thought is that this whole thing could be done away with if we
> just allowed people to pass through arbitrary options to the editor,
> like
>
> \edit file.sql +50 -a -b -c
>
> For powerusers, this could have interesting possibilities.

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.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: eviscerating the parser
Next
From: Jeff Janes
Date:
Subject: Re: eviscerating the parser