Re: [PATCH] GROUP BY ALL - Mailing list pgsql-hackers

From Chao Li
Subject Re: [PATCH] GROUP BY ALL
Date
Msg-id B2FFB2B2-2FBD-4B1E-90EF-311ABC7A2776@gmail.com
Whole thread Raw
In response to Re: [PATCH] GROUP BY ALL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] GROUP BY ALL
List pgsql-hackers


On Sep 28, 2025, at 06:23, Tom Lane <tgl@sss.pgh.pa.us> wrote:

+ /* Iterate over targets, adding acceptable ones to the result list */
+ foreach_ptr(TargetEntry, tle, *targetlist)
+ {
+ /* Ignore junk TLEs */
+ if (tle->resjunk)
+ continue;

Do we want to specifically check “ctid”?

If a user does:

```
select ctid, col1, col2, ... from t group by all;
```

It would be equivalent to no group by. Combing “select ctid” with “group by all” seems totally useless, but when users do such things, we can optimize that.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/




pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: Why cannot alter column type when a view depends on it?
Next
From: Álvaro Herrera
Date:
Subject: Re: allow benign typedef redefinitions (C11)