mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add a \setenv command to psql.
This can be used to set (or unset) environment variables that will affect programs called by psql (such as the PAGER), probably most usefully in a .psqlrc file. Andrew Dunstan, reviewed by Josh Kupershmidt.
This commit is contained in:
@ -2241,6 +2241,24 @@ lo_import 152801
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>\setenv [ <replaceable class="parameter">name</replaceable> [ <replaceable class="parameter">value</replaceable> ] ]</literal></term>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the environment variable <replaceable
|
||||
class="parameter">name</replaceable> to <replaceable
|
||||
class="parameter">value</replaceable>, or if the
|
||||
<replaceable class="parameter">value</replaceable> is
|
||||
not supplied, unsets the environment variable. Example:
|
||||
<programlisting>
|
||||
testdb=> <userinput>\setenv PAGER less</userinput>
|
||||
testdb=> <userinput>\setenv LESS -imx4F</userinput>
|
||||
</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>\sf[+] <replaceable class="parameter">function_description</> </literal></term>
|
||||
|
||||
|
Reference in New Issue
Block a user