Re: group by can use alias from select list

2023-09-26 Thread Bruce Momjian
On Thu, Sep 7, 2023 at 10:11:00AM -0400, Bruce Momjian wrote: > We do farther down the docs in the GROUP BY section: > > https://www.postgresql.org/docs/devel/sql-select.html > > GROUP BY will condense into a single row all selected rows that share > the same values for the gro

Re: group by can use alias from select list

2023-09-07 Thread Bruce Momjian
On Wed, Sep 6, 2023 at 08:01:30PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, Jul 11, 2023 at 07:31:26AM -0700, David G. Johnston wrote: > >> I think the complaint is that someone seeing the behavior in the wild > >> comes to > >> this order-of-operations and doesn't see that the

Re: group by can use alias from select list

2023-09-06 Thread Tom Lane
Bruce Momjian writes: > On Tue, Jul 11, 2023 at 07:31:26AM -0700, David G. Johnston wrote: >> I think the complaint is that someone seeing the behavior in the wild comes >> to >> this order-of-operations and doesn't see that the observed behavior is >> documented. > How is the attached patch? M

Re: group by can use alias from select list

2023-09-06 Thread Bruce Momjian
On Tue, Jul 11, 2023 at 07:31:26AM -0700, David G. Johnston wrote: > On Tue, Jul 11, 2023 at 7:19 AM Laurenz Albe wrote: > > On Fri, 2023-07-07 at 07:36 +, PG Doc comments form wrote: > > i have a discussion in pgsql-b...@lists.postgresql.org about this and it > is > > mention

Re: group by can use alias from select list

2023-07-11 Thread David G. Johnston
On Tue, Jul 11, 2023 at 7:19 AM Laurenz Albe wrote: > On Fri, 2023-07-07 at 07:36 +, PG Doc comments form wrote: > > i have a discussion in pgsql-b...@lists.postgresql.org about this and > it is > > mentioned in the answers that it is documented and a "feature" of > Postgres > > that this can

Re: group by can use alias from select list

2023-07-11 Thread Laurenz Albe
On Fri, 2023-07-07 at 07:36 +, PG Doc comments form wrote: > i have a discussion in pgsql-b...@lists.postgresql.org about this and it is > mentioned in the answers that it is documented and a "feature" of Postgres > that this can be done. > If this is wanted the documentation > (https://www.pos

group by can use alias from select list

2023-07-11 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/15/sql-select.html Description: hi i have a discussion in pgsql-b...@lists.postgresql.org about this and it is mentioned in the answers that it is documented and a "feature" of Postgres that