postgresql/contrib/dblink
Fujii Masao 21a86b0eba postgres_fdw: Fix unexpected reporting of empty message.
pgfdw_report_error() in postgres_fdw gets a message from PGresult or
PGconn to report an error received from a remote server. Previously
if it could get a message from neither of them, it reported empty
message unexpectedly. The cause of this issue was that pgfdw_report_error()
didn't handle properly the case where no message could be obtained
and its local variable message_primary was set to '\0'.

This commit improves pgfdw_report_error() so that it reports the message
"could not obtain ..." when it gets no message and message_primary
is set to '\0'. This is the same behavior as when message_primary is NULL.

dblink_res_error() in dblink has the same issue, so this commit also
improves it in the same way.

Back-patch to all supported branches.

Author: Fujii Masao
Reviewed-by: Bharath Rupireddy
Discussion: https://postgr.es/m/477c16c8-7ea4-20fc-38d5-ed3a77ed616c@oss.nttdata.com
2021-12-03 17:37:19 +09:00
..
expected Deduplicate "invalid input syntax" messages for various types. 2018-07-22 14:58:01 -07:00
input
output
sql Indexes with INCLUDE columns and their support in B-tree 2018-04-07 23:00:39 +03:00
.gitignore
dblink--1.0--1.1.sql
dblink--1.1--1.2.sql Fix parallel-safety markings for contrib/dblink. 2016-06-17 23:08:21 -04:00
dblink--1.2.sql Fix parallel-safety markings for contrib/dblink. 2016-06-17 23:08:21 -04:00
dblink--unpackaged--1.0.sql
dblink.c postgres_fdw: Fix unexpected reporting of empty message. 2021-12-03 17:37:19 +09:00
dblink.control Update dblink extension for parallel query. 2016-06-17 15:18:44 -04:00
Makefile Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
pg_service.conf