postgresql/src
Fujii Masao 2eb3bc5881 Fix issues around .pgpass file.
This commit fixes the following two issues around .pgpass file.

(1) If the length of a line in .pgpass file was larger than 319B,
        libpq silently treated each 319B in the line as a separate
        setting line.

(2) The document explains that a line beginning with # is treated
        as a comment in .pgpass. But there was no code doing such
        special handling. Whether a line begins with # or not, libpq
        just checked that the first token in the line match with the host.

For (1), this commit makes libpq warn if the length of a line
is larger than 319B, and throw away the remaining part beginning
from 320B position.

For (2), this commit changes libpq so that it treats any lines
beginning with # as comments.

Author: Fujii Masao
Reviewed-by: Hamid Akhtar
Discussion: https://postgr.es/m/c0f0c01c-fa74-9749-2084-b73882fd5465@oss.nttdata.com
2020-03-05 13:00:38 +09:00
..
backend Fix more issues with dependency handling at swap phase of REINDEX CONCURRENTLY 2020-03-05 12:50:15 +09:00
bin Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
common Fix command-line colorization on Windows with VT100-compatible environments 2020-03-02 15:45:34 +09:00
fe_utils Fix bug in pg_basebackup -F plain -R. 2020-02-12 09:08:22 +09:00
include Extend ExecBuildAggTrans() to support a NULL pointer check. 2020-03-04 17:29:18 -08:00
interfaces Fix issues around .pgpass file. 2020-03-05 13:00:38 +09:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
port Move pg_upgrade's Windows link() implementation to AC_REPLACE_FUNCS 2020-03-04 08:22:54 +01:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
timezone Require stdint.h 2020-02-21 09:20:32 +01:00
tools Move pg_upgrade's Windows link() implementation to AC_REPLACE_FUNCS 2020-03-04 08:22:54 +01:00
tutorial Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00