postgresql/contrib/postgres_fdw
Tom Lane 3071bbfe44 Fix null-pointer crash in postgres_fdw's conversion_error_callback.
Commit c7b7311f6 adjusted conversion_error_callback to always use
information from the query's rangetable, to avoid doing catalog lookups
in an already-failed transaction.  However, as a result of the utterly
inadequate documentation for make_tuple_from_result_row, I failed to
realize that fsstate could be NULL in some contexts.  That led to a
crash if we got a conversion error in such a context.  Fix by falling
back to the previous coding when fsstate is NULL.  Improve the
commentary, too.

Per report from Andrey Borodin.  Back-patch to 9.6, like the previous
patch.

Discussion: https://postgr.es/m/08916396-55E4-4D68-AB3A-BD6066F9E5C0@yandex-team.ru
2021-10-06 15:50:24 -04:00
..
expected Fix null-pointer crash in postgres_fdw's conversion_error_callback. 2021-10-06 15:50:24 -04:00
sql Fix null-pointer crash in postgres_fdw's conversion_error_callback. 2021-10-06 15:50:24 -04:00
.gitignore Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
Makefile postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
connection.c postgres_fdw: Refactor transaction rollback code to avoid code duplication. 2021-09-22 23:47:36 +09:00
deparse.c postgres_fdw: Fix issues with generated columns in foreign tables. 2021-08-05 20:00:00 +09:00
option.c postgres_fdw: Allow application_name of remote connection to be set via GUC. 2021-09-07 12:27:30 +09:00
postgres_fdw--1.0--1.1.sql postgres_fdw: Add functions to discard cached connections. 2021-01-26 15:35:54 +09:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw.c Fix null-pointer crash in postgres_fdw's conversion_error_callback. 2021-10-06 15:50:24 -04:00
postgres_fdw.control postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
postgres_fdw.h postgres_fdw: Allow application_name of remote connection to be set via GUC. 2021-09-07 12:27:30 +09:00
shippable.c Replace remaining uses of "whitelist". 2021-01-05 14:00:16 +13:00