Re: wrong field in example - Mailing list pgsql-docs

From David G. Johnston
Subject Re: wrong field in example
Date
Msg-id CAKFQuwb=tMmBMFY=3VyC2sYMEd=wFYa3YF+Riq7r-Pa6Hrppog@mail.gmail.com
Whole thread Raw
In response to wrong field in example  (PG Doc comments form <noreply@postgresql.org>)
Responses Re: wrong field in example
List pgsql-docs
Just noticed you replied to me only.  Send replies to the list.  You can leave individuals cc'd.  The convention here is also to inline your replies - top-posting is undesirable.

In any case, in order to write "select *" you have to group on both x and y at the same time.  If you group on either column only, the query will fail.  So the choice of x versus y is immaterial.  Having grouped on x the text is explaining that the failure to also group on y is a problem.

I don't know that the existing wording is the most clear, but it is correct.

David J.

On Wed, Jul 24, 2024 at 8:02 AM Yaroslav Saburov <y.saburov@gmail.com> wrote:
 >>because there is no single value for the column y that could be
associated with each group.

24 лип. 2024 р. о 17:51 David G. Johnston <david.g.johnston@gmail.com> пише:




On Wed, Jul 24, 2024, 07:45 Yaroslav Saburov <y.saburov@gmail.com> wrote:
group by y, not by x

Why?

David J.

pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: wrong field in example
Next
From: Tom Lane
Date:
Subject: Re: wrong field in example