diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index e48ad24700..36a1ba46d5 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -4859,32 +4859,36 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' commands. - The system-wide startup file is named psqlrc and is + The system-wide startup file is named psqlrc. + By default it is sought in the installation's system configuration directory, which is most reliably identified by running pg_config - --sysconfdir. By default this directory will be ../etc/ + --sysconfdir. + Typically this directory will be ../etc/ relative to the directory containing - the PostgreSQL executables. The name of this - directory can be set explicitly via the PGSYSCONFDIR - environment variable. + the PostgreSQL executables. + The directory to look in can be set explicitly via + the PGSYSCONFDIR environment variable. The user's personal startup file is named .psqlrc - and is sought in the invoking user's home directory. On Windows, which - lacks such a concept, the personal startup file is named + and is sought in the invoking user's home directory. + On Windows the personal startup file is instead named %APPDATA%\postgresql\psqlrc.conf. - The location of the user's startup file can be set explicitly via + In either case, this default file path can be overridden by setting the PSQLRC environment variable. Both the system-wide startup file and the user's personal startup file can be made psql-version-specific by appending a dash and the PostgreSQL - major or minor release number to the file name, - for example ~/.psqlrc-9.2 or - ~/.psqlrc-9.2.5. The most specific - version-matching file will be read in preference to a - non-version-specific file. + major or minor release identifier to the file name, + for example ~/.psqlrc-&majorversion; or + ~/.psqlrc-&version;. + The most specific version-matching file will be read in preference + to a non-version-specific file. + These version suffixes are added after determining the file path + as explained above.