Re: review: psql: edit function, show function commands patch

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Jan Urbański <wulczer(at)wulczer(dot)org>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: review: psql: edit function, show function commands patch
Date: 2010-08-11 23:53:08
Message-ID: AANLkTinLAkTqJni-kPzXPhJe10AD+szRTKDgMOEcaxdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 11, 2010 at 6:21 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> ...  If you're still unhappy with it, you're going to need to
>> be more specific, or hack on it yourself.
>
> I'm doing another pass over this.  I notice that the documentation
> claims the syntax of \e is "\e [FILE] [LINE]", but what is actually
> implemented is "\e [FILE [LINE]]", ie it is not possible to specify a
> line number without a file.  Now, it seems to me that specifying a line
> number in the query buffer would actually be a pretty darn useful thing
> to do, if you'd typed in a large query and the backend had spit back
> "LINE 42: some problem or other".  So I think we should fix it so that
> case works and the documentation isn't lying.  This would require
> interpreting \e followed by a digit string as a line number not a file
> ... anybody have a problem with that?  If you're really eager to edit a
> numerically-named file you could fake it out with "\e 1234 1".

Or \e ./1234

It's a minor incompatibility, but it's probably reasonable to allow that.

> BTW, there doesn't seem to be a need to do anything similar for \ef.
> It does have the ability to omit a func name, but then you get a blank
> CREATE FUNCTION template you're going to have to fill in, so there's
> no advantage to positioning the cursor beyond the first line to start.

Hmm, OK.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-12 00:43:20 Re: review: psql: edit function, show function commands patch
Previous Message David Fetter 2010-08-11 23:49:58 Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)