1
1
<!--
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 $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -440,8 +440,9 @@ PostgreSQL documentation
440
440
<term><option>--no-psqlrc</></term>
441
441
<listitem>
442
442
<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).
445
446
</para>
446
447
</listitem>
447
448
</varlistentry>
@@ -1109,7 +1110,7 @@ testdb=>
1109
1110
=> <userinput>\echo `date`</userinput>
1110
1111
Tue Oct 26 21:40:57 CEST 1999
1111
1112
</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
1113
1114
newline is not written.
1114
1115
</para>
1115
1116
@@ -1901,8 +1902,8 @@ bar
1901
1902
The autocommit-on mode is <productname>PostgreSQL</>'s traditional
1902
1903
behavior, but autocommit-off is closer to the SQL spec. If you
1903
1904
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.
1906
1907
</para>
1907
1908
</note>
1908
1909
</listitem>
@@ -2415,8 +2416,8 @@ testdb=> \set PROMPT1 '%[%033[1;33;40m%]%n@%/%R%[%033[0m%#%] '
2415
2416
<para>
2416
2417
<application>psql</application> supports the <application>Readline</application>
2417
2418
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
2420
2421
<application>psql</application> starts up. Tab-completion is also
2421
2422
supported, although the completion logic makes no claim to be an
2422
2423
<acronym>SQL</acronym> parser. If for some reason you do not like the tab completion, you
@@ -2440,17 +2441,6 @@ $endif
2440
2441
<title>Environment</title>
2441
2442
2442
2443
<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
-
2454
2444
<varlistentry>
2455
2445
<term><envar>PAGER</envar></term>
2456
2446
@@ -2531,20 +2521,34 @@ $endif
2531
2521
<listitem>
2532
2522
<para>
2533
2523
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</>
2538
2530
for information on setting up the system-wide file. It could be used
2539
2531
to set up the client or the server to taste (using the <command>\set
2540
2532
</command> and <command>SET</command> commands).
2541
2533
</para>
2542
2534
</listitem>
2543
2535
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
+
2544
2547
<listitem>
2545
2548
<para>
2546
2549
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.
2548
2552
</para>
2549
2553
</listitem>
2550
2554
</itemizedlist>