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

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Extend psql's \e and \ef commands so that a line number can be
Date: 2010-08-12 00:40:59
Message-ID: 20100812004059.C9DF07541D7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2010-08-12 02:03:58 pgsql: Back out syntax case changes --- seems they were intentional.
Previous Message Thom Brown 2010-08-11 22:19:26 Re: pgsql: Properly lowercase identifiers, uppercase keywords, in doc