Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f734857

Browse files
committed
Doc: improve documentation about where the psqlrc files are.
Remove no-longer-accurate claim that Windows lacks home directories. Clarify the text by more clearly distinguishing which statements reflect hard-wired choices versus which ones reflect overridable defaults. Update the examples of version-specific file names, and make them track future version changes by using "&majorversion;" and "&version;". (BTW, in devel and beta releases this method correctly says that you can use strings like "16devel" and "15beta4" as minor version identifiers.) Back-patch to v15, but not further, with the thought that in older releases the examples with three-part version numbers still had some historical relevance. v15 will be the first major release after the last 9.x branch went out of support. Robert Treat and Tom Lane, reviewed by Julien Rouhaud Discussion: https://postgr.es/m/CAJSLCQ07F-WCYYYOY8+dWhHcVeJ1Pb01cWc-c0Hu=M3EjKT2Eg@mail.gmail.com
1 parent c4b6d21 commit f734857

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

doc/src/sgml/ref/psql-ref.sgml

+17-13
Original file line numberDiff line numberDiff line change
@@ -4892,32 +4892,36 @@ PSQL_EDITOR_LINENUMBER_ARG='--line '
48924892
commands.
48934893
</para>
48944894
<para>
4895-
The system-wide startup file is named <filename>psqlrc</filename> and is
4895+
The system-wide startup file is named <filename>psqlrc</filename>.
4896+
By default it is
48964897
sought in the installation's <quote>system configuration</quote> directory,
48974898
which is most reliably identified by running <literal>pg_config
4898-
--sysconfdir</literal>. By default this directory will be <filename>../etc/</filename>
4899+
--sysconfdir</literal>.
4900+
Typically this directory will be <filename>../etc/</filename>
48994901
relative to the directory containing
4900-
the <productname>PostgreSQL</productname> executables. The name of this
4901-
directory can be set explicitly via the <envar>PGSYSCONFDIR</envar>
4902-
environment variable.
4902+
the <productname>PostgreSQL</productname> executables.
4903+
The directory to look in can be set explicitly via
4904+
the <envar>PGSYSCONFDIR</envar> environment variable.
49034905
</para>
49044906
<para>
49054907
The user's personal startup file is named <filename>.psqlrc</filename>
4906-
and is sought in the invoking user's home directory. On Windows, which
4907-
lacks such a concept, the personal startup file is named
4908+
and is sought in the invoking user's home directory.
4909+
On Windows the personal startup file is instead named
49084910
<filename>%APPDATA%\postgresql\psqlrc.conf</filename>.
4909-
The location of the user's startup file can be set explicitly via
4911+
In either case, this default file path can be overridden by setting
49104912
the <envar>PSQLRC</envar> environment variable.
49114913
</para>
49124914
<para>
49134915
Both the system-wide startup file and the user's personal startup file
49144916
can be made <application>psql</application>-version-specific
49154917
by appending a dash and the <productname>PostgreSQL</productname>
4916-
major or minor release number to the file name,
4917-
for example <filename>~/.psqlrc-9.2</filename> or
4918-
<filename>~/.psqlrc-9.2.5</filename>. The most specific
4919-
version-matching file will be read in preference to a
4920-
non-version-specific file.
4918+
major or minor release identifier to the file name,
4919+
for example <filename>~/.psqlrc-&majorversion;</filename> or
4920+
<filename>~/.psqlrc-&version;</filename>.
4921+
The most specific version-matching file will be read in preference
4922+
to a non-version-specific file.
4923+
These version suffixes are added after determining the file path
4924+
as explained above.
49214925
</para>
49224926
</listitem>
49234927
</varlistentry>

0 commit comments

Comments
 (0)