pgsql: Fix a few mistakes in partition aggregate tests

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix a few mistakes in partition aggregate tests
Date: 2026-10-19 21:32:42
Message-ID: E1xIuyI-00000002IiK-2RnG@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix a few mistakes in partition aggregate tests

The pattern seems to be to EXPLAIN the query to ensure we get the
expected partition-wise aggregate plan, then run the same query to check
the results are what we expect. A couple of places didn't use the same
query between the EXPLAIN and the checking of the results, which
effectively voided the plan check.

Additionally, a comment claimed array_agg() didn't support partial mode,
but that was made not true in 16fd03e95.

Author: Matthias van de Meent <boekewurm(at)gmail(dot)com>
Reviewed-by: Pierre Forstmann <pierre(dot)forstmann(at)gmail(dot)com>
Reviewed-by: David Rowley <dgrowleyml(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAEze2WgjJUiqV-VZVrWqYz+ETLtd4oKk2gbvBWxf1Fo0is5XVQ@mail.gmail.com
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/91b401dc1e9db85e5884c6c0f6dab0fafb0bebeb

Modified Files
--------------
src/test/regress/expected/partition_aggregate.out | 14 ++++++++------
src/test/regress/sql/partition_aggregate.sql | 8 ++++----
2 files changed, 12 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2026-10-19 21:33:39 pgsql: Fix a few mistakes in partition aggregate tests
Previous Message Peter Eisentraut 2026-10-19 10:47:14 Re: pgsql: Optimize tuple deformation