From ba356a397de565c014384aa01a945aab7d50928c Mon Sep 17 00:00:00 2001
From: Tom Lane
Date: Sat, 29 May 2021 14:27:37 -0400
Subject: Doc: improve libpq service-file docs, avoid overspecifying pathnames.
Clarify libpq.sgml's description of service file locations and
semantics. Avoid use of backtick'ed pg_config calls to describe
paths; that doesn't work on Windows, and even on Unix it's an
idiom that not all readers may be instantly familiar with.
Don't overspecify the locations of include files, instead writing
only as much as you'd use in #include directives. The previous text
in these places was incorrect for some installations, depending on
where "postgresql" is in the install path.
Our convention for referencing the user's home directory seems
to be "~", so change the one place that spelled it "$HOME".
install-windows.sgml follows the platform convention of spelling
file paths with "\", so change the one place that used "/".
Haiying Tang and Tom Lane
Discussion: https://postgr.es/m/162149020918.26174.7150424047314144297@wrigleys.postgresql.org
---
doc/src/sgml/config.sgml | 2 +-
doc/src/sgml/install-windows.sgml | 2 +-
doc/src/sgml/libpq.sgml | 48 +++++++++++++++++++++++++++------------
doc/src/sgml/pgbuffercache.sgml | 2 +-
4 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 3b7da468b7c..d8c0fd3315d 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -10888,7 +10888,7 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
If LLVM has the required functionality, emit the data needed to allow
perf to profile functions generated by JIT.
- This writes out files to $HOME/.debug/jit/; the
+ This writes out files to ~/.debug/jit/; the
user is responsible for performing cleanup when desired.
The default setting is off.
This parameter can only be set at server start.
diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml
index db53ee85a87..312edc6f7aa 100644
--- a/doc/src/sgml/install-windows.sgml
+++ b/doc/src/sgml/install-windows.sgml
@@ -102,7 +102,7 @@
The tools for building using Visual C++ or
Platform SDK are in the
- src/tools/msvc directory. When building, make sure
+ src\tools\msvc directory. When building, make sure
there are no tools from MinGW or
Cygwin present in your system PATH. Also, make
sure you have all the required Visual C++ tools available in the PATH. In
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 875950b83c0..2fc638c376f 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -3829,8 +3829,9 @@ Oid PQftype(const PGresult *res,
You can query the system table pg_type to
obtain the names and properties of the various data types. The
OIDs of the built-in data types are defined
- in the file include/server/catalog/pg_type_d.h
- in the install directory.
+ in the file catalog/pg_type_d.h
+ in the PostgreSQL
+ installation's include directory.
@@ -8091,26 +8092,30 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
The connection service file allows libpq connection parameters to be
associated with a single service name. That service name can then be
- specified by a libpq connection, and the associated settings will be
+ specified in a libpq connection string, and the associated settings will be
used. This allows connection parameters to be modified without requiring
- a recompile of the libpq application. The service name can also be
+ a recompile of the libpq-using application. The service name can also be
specified using the PGSERVICE environment variable.
- The connection service file can be a per-user service file
- at ~/.pg_service.conf or the location
- specified by the environment variable PGSERVICEFILE,
- or it can be a system-wide file
- at `pg_config --sysconfdir`/pg_service.conf or in the directory
- specified by the environment variable
- PGSYSCONFDIR. If service definitions with the same
- name exist in the user and the system file, the user file takes
- precedence.
+ Service names can be defined in either a per-user service file or a
+ system-wide file. If the same service name exists in both the user
+ and the system file, the user file takes precedence.
+ By default, the per-user service file is located
+ at ~/.pg_service.conf; this can be overridden by
+ setting the environment variable PGSERVICEFILE.
+ The system-wide file is named pg_service.conf.
+ By default it is sought in the etc directory
+ of the PostgreSQL installation
+ (use pg_config --sysconfdir to identify this
+ directory precisely). Another directory, but not a different file
+ name, can be specified by setting the environment variable
+ PGSYSCONFDIR.
- The file uses an INI file
format where the section
+ Either service file uses an INI file
format where the section
name is the service name and the parameters are connection
parameters; see for a list. For
example:
@@ -8121,9 +8126,22 @@ host=somehost
port=5433
user=admin
- An example file is provided at
+ An example file is provided in
+ the PostgreSQL installation at
share/pg_service.conf.sample.
+
+
+ Connection parameters obtained from a service file are combined with
+ parameters obtained from other sources. A service file setting
+ overrides the corresponding environment variable, and in turn can be
+ overridden by a value given directly in the connection string.
+ For example, using the above service file, a connection string
+ service=mydb port=5434 will use
+ host somehost, port 5434,
+ user admin, and other parameters as set by
+ environment variables or built-in defaults.
+
diff --git a/doc/src/sgml/pgbuffercache.sgml b/doc/src/sgml/pgbuffercache.sgml
index bebbc6b732d..e68d159d30f 100644
--- a/doc/src/sgml/pgbuffercache.sgml
+++ b/doc/src/sgml/pgbuffercache.sgml
@@ -96,7 +96,7 @@
Fork number within the relation; see
- include/common/relpath.h
+ common/relpath.h
--
cgit v1.2.3