postgresql/src/test/regress
Tom Lane b919a97a6c Fix "failed to find plan for subquery/CTE" errors in EXPLAIN.
To deparse a reference to a field of a RECORD-type output of a
subquery, EXPLAIN normally digs down into the subquery's plan to try
to discover exactly which anonymous RECORD type is meant.  However,
this can fail if the subquery has been optimized out of the plan
altogether on the grounds that no rows could pass the WHERE quals,
which has been possible at least since 3fc6e2d7f.  There isn't
anything remaining in the plan tree that would help us, so fall back
to printing the field name as "fN" for the N'th column of the record.
(This will actually be the right thing some of the time, since it
matches the column names we assign to RowExprs.)

In passing, fix a comment typo in create_projection_plan, which
I noticed while experimenting with an alternative fix for this.

Per bug #18576 from Vasya B.  Back-patch to all supported branches.

Richard Guo and Tom Lane

Discussion: https://postgr.es/m/18576-9feac34e132fea9e@postgresql.org
2024-08-09 11:21:39 -04:00
..
data Fix full text search to handle NOT above a phrase search correctly. 2020-04-27 12:21:04 -04:00
expected Fix "failed to find plan for subquery/CTE" errors in EXPLAIN. 2024-08-09 11:21:39 -04:00
sql Fix "failed to find plan for subquery/CTE" errors in EXPLAIN. 2024-08-09 11:21:39 -04:00
.gitignore Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
GNUmakefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
parallel_schedule Improve test coverage for changes to inplace-updated catalogs. 2024-06-27 19:21:05 -07:00
pg_regress.c Replace some strtok() with strsep() 2024-07-22 15:45:46 +02:00
pg_regress.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_regress_main.c Fix handling of expecteddir in pg_regress 2024-03-15 17:02:07 +01:00
README Don't generate plain-text HISTORY and src/test/regress/README anymore. 2014-02-10 20:48:04 -05:00
regress.c Remove --disable-spinlocks. 2024-07-30 22:58:37 +12:00
regressplans.sh Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
resultmap Remove HP-UX port. 2022-07-08 14:05:05 +12:00

Documentation concerning how to run these regression tests and interpret
the results can be found in the PostgreSQL manual, in the chapter
"Regression Tests".