1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Add psql PROMPT variable showing which line of a statement is being edited.

The new %l substitution shows the line number inside a (potentially
multi-line) statement starting from one.

Author: Sawada Masahiko, heavily editorialized by me.
Reviewed-By: Jeevan Chalke, Alvaro Herrera
This commit is contained in:
Andres Freund
2014-09-02 13:05:48 +02:00
parent bd3b7a9eef
commit 51bb79569f
5 changed files with 47 additions and 6 deletions

View File

@ -3315,6 +3315,15 @@ testdb=&gt; <userinput>INSERT INTO my_table VALUES (:'content');</userinput>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%l</literal></term>
<listitem>
<para>
The line number inside the current statement, starting from <literal>1</>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%</literal><replaceable class="parameter">digits</replaceable></term>
<listitem>