pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix failure to detect some cases of improperly-nested aggregates
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix failure to detect some cases of improperly-nested aggregates
@ 2023-03-13 16:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-03-13 16:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure to detect some cases of improperly-nested aggregates.

check_agg_arguments_walker() supposed that it needn't descend into
the arguments of a lower-level aggregate function, but this is
just wrong in the presence of multiple levels of sub-select.  The
oversight would lead to executor failures on queries that should
be rejected.  (Prior to v11, they actually were rejected, thanks
to a "redundant" execution-time check.)

Per bug #17835 from Anban Company.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17835-4f29f3098b2d0ba4@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/30dbdbe75384bcb034172c781b24bc982434a967

Modified Files
--------------
src/backend/parser/parse_agg.c           | 3 +--
src/test/regress/expected/aggregates.out | 6 ++++++
src/test/regress/sql/aggregates.sql      | 3 +++
3 files changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix failure to detect some cases of improperly-nested aggregates
@ 2023-03-13 16:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-03-13 16:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure to detect some cases of improperly-nested aggregates.

check_agg_arguments_walker() supposed that it needn't descend into
the arguments of a lower-level aggregate function, but this is
just wrong in the presence of multiple levels of sub-select.  The
oversight would lead to executor failures on queries that should
be rejected.  (Prior to v11, they actually were rejected, thanks
to a "redundant" execution-time check.)

Per bug #17835 from Anban Company.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17835-4f29f3098b2d0ba4@postgresql.org

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5fd61bdc114f85ce57da1f139c8bda0f41d1951b

Modified Files
--------------
src/backend/parser/parse_agg.c           | 3 +--
src/test/regress/expected/aggregates.out | 6 ++++++
src/test/regress/sql/aggregates.sql      | 3 +++
3 files changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix failure to detect some cases of improperly-nested aggregates
@ 2023-03-13 16:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-03-13 16:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure to detect some cases of improperly-nested aggregates.

check_agg_arguments_walker() supposed that it needn't descend into
the arguments of a lower-level aggregate function, but this is
just wrong in the presence of multiple levels of sub-select.  The
oversight would lead to executor failures on queries that should
be rejected.  (Prior to v11, they actually were rejected, thanks
to a "redundant" execution-time check.)

Per bug #17835 from Anban Company.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17835-4f29f3098b2d0ba4@postgresql.org

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/096e708056ead615f82a851d0825d9d6b40f7c96

Modified Files
--------------
src/backend/parser/parse_agg.c           | 3 +--
src/test/regress/expected/aggregates.out | 6 ++++++
src/test/regress/sql/aggregates.sql      | 3 +++
3 files changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix failure to detect some cases of improperly-nested aggregates
@ 2023-03-13 16:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-03-13 16:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure to detect some cases of improperly-nested aggregates.

check_agg_arguments_walker() supposed that it needn't descend into
the arguments of a lower-level aggregate function, but this is
just wrong in the presence of multiple levels of sub-select.  The
oversight would lead to executor failures on queries that should
be rejected.  (Prior to v11, they actually were rejected, thanks
to a "redundant" execution-time check.)

Per bug #17835 from Anban Company.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17835-4f29f3098b2d0ba4@postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bc0bcce2e74bf777b458e3fd815bb125dbda2ce6

Modified Files
--------------
src/backend/parser/parse_agg.c           | 3 +--
src/test/regress/expected/aggregates.out | 6 ++++++
src/test/regress/sql/aggregates.sql      | 3 +++
3 files changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix failure to detect some cases of improperly-nested aggregates
@ 2023-03-13 16:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-03-13 16:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure to detect some cases of improperly-nested aggregates.

check_agg_arguments_walker() supposed that it needn't descend into
the arguments of a lower-level aggregate function, but this is
just wrong in the presence of multiple levels of sub-select.  The
oversight would lead to executor failures on queries that should
be rejected.  (Prior to v11, they actually were rejected, thanks
to a "redundant" execution-time check.)

Per bug #17835 from Anban Company.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17835-4f29f3098b2d0ba4@postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/62a91a1b092606e55d8a9807d249ceda58feebb0

Modified Files
--------------
src/backend/parser/parse_agg.c           | 3 +--
src/test/regress/expected/aggregates.out | 6 ++++++
src/test/regress/sql/aggregates.sql      | 3 +++
3 files changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix failure to detect some cases of improperly-nested aggregates
@ 2023-03-13 16:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-03-13 16:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure to detect some cases of improperly-nested aggregates.

check_agg_arguments_walker() supposed that it needn't descend into
the arguments of a lower-level aggregate function, but this is
just wrong in the presence of multiple levels of sub-select.  The
oversight would lead to executor failures on queries that should
be rejected.  (Prior to v11, they actually were rejected, thanks
to a "redundant" execution-time check.)

Per bug #17835 from Anban Company.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17835-4f29f3098b2d0ba4@postgresql.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0736b11318daaa38f808197f707fabed79b3aef8

Modified Files
--------------
src/backend/parser/parse_agg.c           | 3 +--
src/test/regress/expected/aggregates.out | 6 ++++++
src/test/regress/sql/aggregates.sql      | 3 +++
3 files changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2023-03-13 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 16:40 pgsql: Fix failure to detect some cases of improperly-nested aggregates Tom Lane <tgl@sss.pgh.pa.us>
2023-03-13 16:40 pgsql: Fix failure to detect some cases of improperly-nested aggregates Tom Lane <tgl@sss.pgh.pa.us>
2023-03-13 16:40 pgsql: Fix failure to detect some cases of improperly-nested aggregates Tom Lane <tgl@sss.pgh.pa.us>
2023-03-13 16:40 pgsql: Fix failure to detect some cases of improperly-nested aggregates Tom Lane <tgl@sss.pgh.pa.us>
2023-03-13 16:40 pgsql: Fix failure to detect some cases of improperly-nested aggregates Tom Lane <tgl@sss.pgh.pa.us>
2023-03-13 16:40 pgsql: Fix failure to detect some cases of improperly-nested aggregates Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox