postgresql/src/backend/optimizer/path
David Rowley 371e3daaa5 Fix incorrect logic for determining safe WindowAgg run conditions
The logic added in 9d9c02ccd to determine when a qual can be used as a
WindowClause run condition failed to correctly check for subqueries in the
qual.  This was being done correctly for normal subquery qual pushdowns,
it's just that 9d9c02ccd failed to follow the lead on that.

This also fixes various other cases where transforming the qual into a
WindowClause run condition in the subquery should have been disallowed.

Bug: #17826
Reported-by: Anban Company
Discussion: https://postgr.es/m/17826-7d8750952f19a5f5@postgresql.org
Backpatch-through: 15, where 9d9c02ccd was introduced.
2023-03-17 15:51:00 +13:00
..
allpaths.c Fix incorrect logic for determining safe WindowAgg run conditions 2023-03-17 15:51:00 +13:00
clausesel.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
costsize.c Revert "Optimize order of GROUP BY keys". 2022-10-03 10:56:16 -04:00
equivclass.c Revert "Optimize order of GROUP BY keys". 2022-10-03 10:56:16 -04:00
indxpath.c Update some comments that should've covered MERGE 2022-10-24 12:52:43 +02:00
joinpath.c Fix Memoize to work with partitionwise joining. 2022-12-05 12:36:41 -05:00
joinrels.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
pathkeys.c Revert "Optimize order of GROUP BY keys". 2022-10-03 10:56:16 -04:00
tidpath.c Update copyright for 2022 2022-01-07 19:04:57 -05:00