pgsql: Fix libpq's code for searching .pgpass; rationalize empty-list-i

2018-08-01 Thread Tom Lane
Fix libpq's code for searching .pgpass; rationalize empty-list-item cases. Before v10, we always searched ~/.pgpass using the host parameter, and nothing else, to match to the "hostname" field of ~/.pgpass. (However, null host or host matching DEFAULT_PGSOCKET_DIR was replaced by "localhost".) In

pgsql: Fix libpq's code for searching .pgpass; rationalize empty-list-i

2018-08-01 Thread Tom Lane
Fix libpq's code for searching .pgpass; rationalize empty-list-item cases. Before v10, we always searched ~/.pgpass using the host parameter, and nothing else, to match to the "hostname" field of ~/.pgpass. (However, null host or host matching DEFAULT_PGSOCKET_DIR was replaced by "localhost".) In

pgsql: Fix libpq's code for searching .pgpass; rationalize empty-list-i

2018-08-01 Thread Tom Lane
Fix libpq's code for searching .pgpass; rationalize empty-list-item cases. Before v10, we always searched ~/.pgpass using the host parameter, and nothing else, to match to the "hostname" field of ~/.pgpass. (However, null host or host matching DEFAULT_PGSOCKET_DIR was replaced by "localhost".) In