Re: Modify an incorrect regression test case in the group by key value elimination function

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: songjinzhou <tsinghualucky912@foxmail.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>, Japin Li <japinli@hotmail.com>
Date: 2025-02-18T11:45:23Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix poorly written regression test

On Tue, 18 Feb 2025 at 20:40, songjinzhou <tsinghualucky912@foxmail.com> wrote:
> Two months ago, we enhanced the group by key value elimination function. This is a very useful function. When I was learning, I found a regression test case that was not suitable, as follows:

> Because the table structure of t3 is defined as follows(Its PK is deferrable):

> I think this test case does not fully reflect the original meaning. So I made a small change to this and look forward to your feedback. Thanks!

That's my mistake. Thanks for spotting it.

I looked at your patch and felt that the flow would be better if all
those tests used t2 rather than t3.  That way we don't need to add the
NOT NULL constraint to both tables, just t2. I wrote the patch to do
it that way and pushed it.

David