@@ -1650,6 +1650,32 @@ Tue Oct 26 21:40:57 CEST 1999
1650
1650
</varlistentry>
1651
1651
1652
1652
1653
+ <varlistentry>
1654
+ <term><literal>\ev <optional> <replaceable class="parameter">view_name</> <optional> <replaceable class="parameter">line_number</> </optional> </optional> </literal></term>
1655
+
1656
+ <listitem>
1657
+ <para>
1658
+ This command fetches and edits the definition of the named view,
1659
+ in the form of a <command>CREATE OR REPLACE VIEW</> command.
1660
+ Editing is done in the same way as for <literal>\edit</>.
1661
+ After the editor exits, the updated command waits in the query buffer;
1662
+ type semicolon or <literal>\g</> to send it, or <literal>\r</>
1663
+ to cancel.
1664
+ </para>
1665
+
1666
+ <para>
1667
+ If no view is specified, a blank <command>CREATE VIEW</>
1668
+ template is presented for editing.
1669
+ </para>
1670
+
1671
+ <para>
1672
+ If a line number is specified, <application>psql</application> will
1673
+ position the cursor on the specified line of the view definition.
1674
+ </para>
1675
+ </listitem>
1676
+ </varlistentry>
1677
+
1678
+
1653
1679
<varlistentry>
1654
1680
<term><literal>\encoding [ <replaceable class="parameter">encoding</replaceable> ]</literal></term>
1655
1681
@@ -2521,6 +2547,25 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput>
2521
2547
</varlistentry>
2522
2548
2523
2549
2550
+ <varlistentry>
2551
+ <term><literal>\sv[+] <replaceable class="parameter">view_name</> </literal></term>
2552
+
2553
+ <listitem>
2554
+ <para>
2555
+ This command fetches and shows the definition of the named view,
2556
+ in the form of a <command>CREATE OR REPLACE VIEW</> command.
2557
+ The definition is printed to the current query output channel,
2558
+ as set by <command>\o</command>.
2559
+ </para>
2560
+
2561
+ <para>
2562
+ If <literal>+</literal> is appended to the command name, then the
2563
+ output lines are numbered from 1.
2564
+ </para>
2565
+ </listitem>
2566
+ </varlistentry>
2567
+
2568
+
2524
2569
<varlistentry>
2525
2570
<term><literal>\t</literal></term>
2526
2571
<listitem>
@@ -3554,9 +3599,10 @@ $endif
3554
3599
3555
3600
<listitem>
3556
3601
<para>
3557
- Editor used by the <command>\e</command> and
3558
- <command>\ef</command> commands. The variables are examined in
3559
- the order listed; the first that is set is used.
3602
+ Editor used by the <command>\e</command>, <command>\ef</command>,
3603
+ and <command>\ev</command> commands.
3604
+ These variables are examined in the order listed;
3605
+ the first that is set is used.
3560
3606
</para>
3561
3607
3562
3608
<para>
@@ -3571,7 +3617,8 @@ $endif
3571
3617
3572
3618
<listitem>
3573
3619
<para>
3574
- When <command>\e</command> or <command>\ef</command> is used
3620
+ When <command>\e</command>, <command>\ef</command>, or
3621
+ <command>\ev</command> is used
3575
3622
with a line number argument, this variable specifies the
3576
3623
command-line argument used to pass the starting line number to
3577
3624
the user's editor. For editors such as <productname>Emacs</> or
0 commit comments