1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-20 15:22:23 +03:00

Add \ir command to psql.

\ir is short for "include relative"; when used from a script, the
supplied pathname will be interpreted relative to the input file,
rather than to the current working directory.

Gurjeet Singh, reviewed by Josh Kupershmidt, with substantial further
cleanup by me.
This commit is contained in:
Robert Haas
2011-07-06 11:45:13 -04:00
parent 5ac6b76789
commit c7f23494c1
9 changed files with 68 additions and 12 deletions

View File

@ -1625,6 +1625,21 @@ Tue Oct 26 21:40:57 CEST 1999
</varlistentry>
<varlistentry>
<term><literal>\ir <replaceable class="parameter">filename</replaceable></literal></term>
<listitem>
<para>
The <literal>\ir</> command is similar to <literal>\i</>, but resolves
relative pathnames differently. When executing in interactive mode,
the two commands behave identically. However, when invoked from a
script, <literal>\ir</literal> interprets pathnames relative to the
directory in which the script is located, rather than the current
working directory.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>\l</literal> (or <literal>\list</literal>)</term>
<term><literal>\l+</literal> (or <literal>\list+</literal>)</term>