11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.127 2005/01/04 03:58:16 tgl Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.128 2005/01/06 18:29:08 tgl Exp $
33PostgreSQL documentation
44-->
55
@@ -440,8 +440,9 @@ PostgreSQL documentation
440440 <term><option>--no-psqlrc</></term>
441441 <listitem>
442442 <para>
443- Do not read the start-up file <filename>/psqlrc</filename> or
444- <filename>~/.psqlrc</filename>.
443+ Do not read the start-up file (neither the system-wide
444+ <filename>psqlrc</filename> file nor the user's
445+ <filename>~/.psqlrc</filename> file).
445446 </para>
446447 </listitem>
447448 </varlistentry>
@@ -1109,7 +1110,7 @@ testdb=>
11091110=> <userinput>\echo `date`</userinput>
11101111Tue Oct 26 21:40:57 CEST 1999
11111112</programlisting>
1112- If the first argument is an unquoted <literal>-n</literal> thethe trailing
1113+ If the first argument is an unquoted <literal>-n</literal> the trailing
11131114 newline is not written.
11141115 </para>
11151116
@@ -1901,8 +1902,8 @@ bar
19011902 The autocommit-on mode is <productname>PostgreSQL</>'s traditional
19021903 behavior, but autocommit-off is closer to the SQL spec. If you
19031904 prefer autocommit-off, you may wish to set it in the system-wide
1904- <filename>psqlrc</filename> or your
1905- <filename>.psqlrc</filename> file.
1905+ <filename>psqlrc</filename>file or your
1906+ <filename>~/ .psqlrc</filename> file.
19061907 </para>
19071908 </note>
19081909 </listitem>
@@ -2415,8 +2416,8 @@ testdb=> \set PROMPT1 '%[%033[1;33;40m%]%n@%/%R%[%033[0m%#%] '
24152416 <para>
24162417 <application>psql</application> supports the <application>Readline</application>
24172418 library for convenient line editing and retrieval. The command
2418- history isstored in a file named <filename>.psql_history</filename >
2419- in your home directory and is reloaded when
2419+ history isautomatically saved when <application>psql</application >
2420+ exits and is reloaded when
24202421 <application>psql</application> starts up. Tab-completion is also
24212422 supported, although the completion logic makes no claim to be an
24222423 <acronym>SQL</acronym> parser. If for some reason you do not like the tab completion, you
@@ -2440,17 +2441,6 @@ $endif
24402441 <title>Environment</title>
24412442
24422443 <variablelist>
2443- <varlistentry>
2444- <term><envar>HOME</envar></term>
2445-
2446- <listitem>
2447- <para>
2448- Directory for initialization file (<filename>.psqlrc</filename>)
2449- and command history file (<filename>.psql_history</filename>).
2450- </para>
2451- </listitem>
2452- </varlistentry>
2453-
24542444 <varlistentry>
24552445 <term><envar>PAGER</envar></term>
24562446
@@ -2531,20 +2521,34 @@ $endif
25312521 <listitem>
25322522 <para>
25332523 Before starting up, <application>psql</application> attempts to
2534- read and execute commands from the the system-wide
2535- <filename>psqlrc</filename> file and the
2536- <filename>$HOME/.psqlrc</filename> file in the user's home
2537- directory. See <filename><replaceable>PREFIX</>/share/psqlrc.sample</>
2524+ read and execute commands from the system-wide
2525+ <filename>psqlrc</filename> file and the user's
2526+ <filename>~/.psqlrc</filename> file.
2527+ (On Windows, the user's startup file is named
2528+ <filename>APPDATA/postgresql/psqlrc.txt</filename>.)
2529+ See <filename><replaceable>PREFIX</>/share/psqlrc.sample</>
25382530 for information on setting up the system-wide file. It could be used
25392531 to set up the client or the server to taste (using the <command>\set
25402532 </command> and <command>SET</command> commands).
25412533 </para>
25422534 </listitem>
25432535
2536+ <listitem>
2537+ <para>
2538+ Both the system-wide <filename>psqlrc</filename> file and the user's
2539+ <filename>~/.psqlrc</filename> file can be made version-specific
2540+ by appending a dash and the <productname>PostgreSQL</productname>
2541+ release number, for example <filename>~/.psqlrc-&version;</filename>.
2542+ A matching version-specific file will be read in preference to a
2543+ non-version-specific file.
2544+ </para>
2545+ </listitem>
2546+
25442547 <listitem>
25452548 <para>
25462549 The command-line history is stored in the file
2547- <filename>$HOME/.psql_history</filename>.
2550+ <filename>~/.psql_history</filename>, or
2551+ <filename>APPDATA/postgresql/psql_history</filename> on Windows.
25482552 </para>
25492553 </listitem>
25502554 </itemizedlist>