postgres/contrib/postgres_fdw
Robert Haas f2bae51dfd Keep track of what RTIs a Result node is scanning.
Result nodes now include an RTI set, which is only non-NULL when they
have no subplan, and is taken from the relid set of the RelOptInfo that
the Result is generating. ExplainPreScanNode now takes notice of these
RTIs, which means that a few things get schema-qualified in the
regression tests that previously did not. This makes the output more
consistent between cases where some part of the plan tree is replaced by
a Result node and those where this does not happen.

Likewise, pg_overexplain's EXPLAIN (RANGE_TABLE) now displays the RTIs
stored in a Result node just as it already does for other RTI-bearing
node types.

Result nodes also now include a result_reason, which tells us something
about why the Result node was inserted.  Using that information, EXPLAIN
now emits, where relevant, a "Replaces" line describing the origin of
a Result node.

The purpose of these changes is to allow code that inspects a Plan
tree to understand the origin of Result nodes that appear therein.

Discussion: http://postgr.es/m/CA+TgmoYeUZePZWLsSO+1FAN7UPePT_RMEZBKkqYBJVCF1s60=w@mail.gmail.com
Reviewed-by: Alexandra Wang <alexandra.wang.oss@gmail.com>
Reviewed-by: Richard Guo <guofenglinux@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
2025-09-23 09:07:55 -04:00
..
expected Keep track of what RTIs a Result node is scanning. 2025-09-23 09:07:55 -04:00
sql postgres_fdw: Use psql variables for connection parameters 2025-09-01 09:02:03 +09:00
t Fix typos and grammar in the code 2025-04-19 19:17:42 +09:00
.gitignore
connection.c postgres_fdw and dblink should check if backend has MyProcPort 2025-08-08 19:34:31 +02:00
deparse.c Fix a typo in the deparseArrayCoerceExpr() header comment 2025-07-18 18:40:07 +03:00
Makefile postgres_fdw: SCRAM authentication pass-through 2025-01-15 17:58:05 +01:00
meson.build meson: Increase minimum version to 0.57.2 2025-07-02 11:14:53 +02:00
option.c Remove INT64_HEX_FORMAT and UINT64_HEX_FORMAT 2025-08-06 11:08:10 +02:00
postgres_fdw--1.1--1.2.sql postgres_fdw: Extend postgres_fdw_get_connections to return remote backend PID. 2025-03-03 08:51: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
postgres_fdw.c Split up pgfdw_report_error so that we can mark it pg_noreturn. 2025-07-29 10:35:01 -04:00
postgres_fdw.control postgres_fdw: Add "used_in_xact" column to postgres_fdw_get_connections(). 2024-07-26 22:15:51 +09:00
postgres_fdw.h Split up pgfdw_report_error so that we can mark it pg_noreturn. 2025-07-29 10:35:01 -04:00
shippable.c Update copyright for 2025 2025-01-01 11:21:55 -05:00