pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix poorly written regression test
Date: Tue, 18 Feb 2025 11:42:40 +0000
Message-ID: <E1tkLzs-007mfI-2Z@gemulon.postgresql.org> (raw)

Fix poorly written regression test

bd10ec529 added code to allow redundant functionally dependent GROUP BY
columns to be removed using unique indexes and NOT NULL constraints as
proofs of functional dependency.  In that commit, I (David) added a test
to ensure that when there are multiple indexes available to remove columns
that we pick the index that allows us to remove the most columns.  This
test was faulty as it assumed the t3 table's primary key index was valid
to use as functional dependency proof, but that's not the case since
that's defined as deferrable.

Here we adjust the tests added by that commit to use the t2 table instead.
That's defined with a non-deferrable primary key.

Author: songjinzhou <tsinghualucky912@foxmail.com>
Author: David Rowley <dgrowleyml@gmail.com>
Reviewed-by: Japin Li <japinli@hotmail.com>
Discussion: https://postgr.es/m/tencent_CD414C79D39668455DF80D35143B87634C08@qq.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/593509202f669dbc4a9db33bb3aca2bd68f7ab5c

Modified Files
--------------
src/test/regress/expected/aggregates.out | 50 ++++++++++++++++----------------
src/test/regress/sql/aggregates.sql      | 26 ++++++++---------
2 files changed, 38 insertions(+), 38 deletions(-)



Message-ID: <E1tkLzs-007mfI-2Z@gemulon.postgresql.org>
Permalink:  ../E1tkLzs-007mfI-2Z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tkLzs-007mfI-2Z@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix poorly written regression test
  In-Reply-To: <E1tkLzs-007mfI-2Z@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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