postgresql/contrib/postgres_fdw
Tom Lane bee18616a6 Avoid doing catalog lookups in postgres_fdw's conversion_error_callback.
As in 50371df26, this is a bad idea since the callback can't really
know what error is being thrown and thus whether or not it is safe
to attempt catalog accesses.  Rather than pushing said accesses into
the mainline code where they'd usually be a waste of cycles, we can
look at the query's rangetable instead.

This change does mean that we'll be printing query aliases (if any
were used) rather than the table or column's true name.  But that
doesn't seem like a bad thing: it's certainly a more useful definition
in self-join cases, for instance.  In any case, it seems unlikely that
any applications would be depending on this detail, so it seems safe
to change.

Patch by me.  Original complaint by Andres Freund; Bharath Rupireddy
noted the connection to conversion_error_callback.

Discussion: https://postgr.es/m/20210106020229.ne5xnuu6wlondjpe@alap3.anarazel.de
2021-07-06 12:36:13 -04:00
..
expected Avoid doing catalog lookups in postgres_fdw's conversion_error_callback. 2021-07-06 12:36:13 -04:00
sql Avoid doing catalog lookups in postgres_fdw's conversion_error_callback. 2021-07-06 12:36:13 -04:00
.gitignore
connection.c postgres_fdw: Fix connection leak. 2020-12-28 19:57:51 +09:00
deparse.c In postgres_fdw, don't try to ship MULTIEXPR updates to remote server. 2020-01-26 14:31:08 -05:00
Makefile
option.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
postgres_fdw--1.0.sql
postgres_fdw.c Avoid doing catalog lookups in postgres_fdw's conversion_error_callback. 2021-07-06 12:36:13 -04:00
postgres_fdw.control
postgres_fdw.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
shippable.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00