Doc: improve libpq service-file docs, avoid overspecifying pathnames.
authorTom Lane
Sat, 29 May 2021 18:27:37 +0000 (14:27 -0400)
committerTom Lane
Sat, 29 May 2021 18:27:37 +0000 (14:27 -0400)
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
doc/src/sgml/install-windows.sgml
doc/src/sgml/libpq.sgml
doc/src/sgml/pgbuffercache.sgml

index 3b7da468b7cc2ac7d196d3ed067d1bc510e443b8..d8c0fd3315de868c09079e99ec5ab92cf925de14 100644 (file)
@@ -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.
index db53ee85a877aba4034936a78ce19a523fb45cc0..312edc6f7aa3a214cab80efd327adb42e9cec561 100644 (file)
  
   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
index 875950b83c0e2c0c97753a603025e2ce6066611e..2fc638c376fd66388fbb0c4b64b437153c8e7f93 100644 (file)
@@ -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.
+  
  
 
 
index bebbc6b732de4f3fb741126fd0c61b3e33256d9f..e68d159d30f1f73cb9d9543a2dd5132eebcbfb0c 100644 (file)
@@ -96,7 +96,7 @@
       
       
        Fork number within the relation;  see
-       include/common/relpath.h
+       common/relpath.h