pgsql: Extend psql's \e and \ef commands so that a line number can be - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Extend psql's \e and \ef commands so that a line number can be
Date
Msg-id 20100812004059.C9DF07541D7@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Extend psql's \e and \ef commands so that a line number can be specified,
and the editor's cursor will be initially placed on that line.  In \e the
lines are counted with respect to the query buffer, while in \ef they are
counted with line 1 = first line of function body.  These choices are useful
for positioning the cursor on the line of a previously-reported error.

To avoid assumptions about what switch the user's editor takes for this
purpose, invent a new psql variable EDITOR_LINENUMBER_SWITCH with (at
present) no default value.

One incompatibility from previous behavior is that "\e 1234" will now
take "1234" as a line number not a file name.  There are at least two
ways to select a numerically-named file if you really want to.

Pavel Stehule, reviewed by Jan Urbanski, with further editing by Robert Haas
and Tom Lane

Modified Files:
--------------
    pgsql/doc/src/sgml/ref:
        psql-ref.sgml (r1.247 -> r1.248)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/psql-ref.sgml?r1=1.247&r2=1.248)
    pgsql/src/backend/utils/adt:
        ruleutils.c (r1.330 -> r1.331)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.330&r2=1.331)
    pgsql/src/bin/psql:
        command.c (r1.225 -> r1.226)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/command.c?r1=1.225&r2=1.226)
        help.c (r1.160 -> r1.161)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/help.c?r1=1.160&r2=1.161)

pgsql-committers by date:

Previous
From: Thom Brown
Date:
Subject: Re: pgsql: Properly lowercase identifiers, uppercase keywords, in doc
Next
From: momjian@postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: Back out syntax case changes --- seems they were intentional.