mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
533915857a67a8a717654c81692e617b893e2a3f
Since commite28cf96e9, the copies of a query level's PlaceHolderVars that were pushed down into its subqueries are preprocessed by that level before its SubLinks are turned into SubPlans, so such a copy may already contain SubPlans by the time the subquery is planned. That commit taught build_subplan not to process the SubLinks of a PHV that is passed down as a SubPlan argument, but overlooked that such a copy can also appear within the arguments of an outer-level Aggref, GroupingFunc, or ReturningExpr. The SubLinks in those arguments are still processed when build_subplan collects the node, and that processing descended into the already-preprocessed PHV and tripped the no-SubPlan assertion in process_sublinks_mutator. To fix, don't descend into PHVs when processing the SubLinks in such a node's arguments. Any PHV found there is a pushed-down copy that its owning level has already preprocessed. Back-patch to v16, as with commite28cf96e9. Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Richard Guo <guofenglinux@gmail.com> Discussion: https://postgr.es/m/CAJTYsWW8THbrnsmYnDqnUgg0PjGrqw2vNOWb8qx7eu191KPW3g@mail.gmail.com Backpatch-through: 16
PostgreSQL Database Management System ===================================== This directory contains the source code distribution of the PostgreSQL database management system. PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings. PostgreSQL has many language interfaces, many of which are listed here: https://www.postgresql.org/download/ See the file INSTALL for instructions on how to build and install PostgreSQL. That file also lists supported operating systems and hardware platforms and contains information regarding any other software packages that are required to build or run the PostgreSQL system. Copyright and license information can be found in the file COPYRIGHT. A comprehensive documentation set is included in this distribution; it can be read as described in the installation instructions. The latest version of this software may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.
Languages
C
83.9%
PLpgSQL
6.2%
Perl
5.4%
Yacc
1.2%
Meson
0.7%
Other
2.4%