postgresql/contrib/postgres_fdw
Tom Lane fd0398fcb0 Improve EXPLAIN's display of SubPlan nodes and output parameters.
Historically we've printed SubPlan expression nodes as "(SubPlan N)",
which is pretty uninformative.  Trying to reproduce the original SQL
for the subquery is still as impractical as before, and would be
mighty verbose as well.  However, we can still do better than that.
Displaying the "testexpr" when present, and adding a keyword to
indicate the SubLinkType, goes a long way toward showing what's
really going on.

In addition, this patch gets rid of EXPLAIN's use of "$n" to represent
subplan and initplan output Params.  Instead we now print "(SubPlan
N).colX" or "(InitPlan N).colX" to represent the X'th output column
of that subplan.  This eliminates confusion with the use of "$n" to
represent PARAM_EXTERN Params, and it's useful for the first part of
this change because it eliminates needing some other indication of
which subplan is referenced by a SubPlan that has a testexpr.

In passing, this adds simple regression test coverage of the
ROWCOMPARE_SUBLINK code paths, which were entirely unburdened
by testing before.

Tom Lane and Dean Rasheed, reviewed by Aleksander Alekseev.
Thanks to Chantal Keller for raising the question of whether
this area couldn't be improved.

Discussion: https://postgr.es/m/2838538.1705692747@sss.pgh.pa.us
2024-03-19 18:19:24 -04:00
..
expected Improve EXPLAIN's display of SubPlan nodes and output parameters. 2024-03-19 18:19:24 -04:00
sql Fix deparsing of Consts in postgres_fdw ORDER BY 2024-03-11 12:27:11 +13: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 Make dblink interruptible, via new libpqsrv APIs. 2024-01-08 11:39:56 -08:00
deparse.c Make the order of the header file includes consistent 2024-03-13 15:07:00 +01:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
option.c Update copyright for 2024 2024-01-03 20:49:05 -05: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 Make dblink interruptible, via new libpqsrv APIs. 2024-01-08 11:39:56 -08: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 Make dblink interruptible, via new libpqsrv APIs. 2024-01-08 11:39:56 -08:00
shippable.c Update copyright for 2024 2024-01-03 20:49:05 -05:00