Re: wrong field in example

2024-07-24 Thread Yaroslav Saburov
first query => SELECT * FROM test1; x | y ---+--- a | 3 c | 2 b | 5 a | 1 (4 rows) second query => SELECT x FROM test1 GROUP BY x; x --- a b c (3 rows) In the second query, we could not have written SELECT * FROM test1 GROUP BY x, because there is no single value for the column y that co

Re: wrong field in example

2024-07-24 Thread Tom Lane
"David G. Johnston" writes: > I don't know that the existing wording is the most clear, but it is correct. Perhaps it'd be better to write "... we could not have written SELECT x, y FROM test1 GROUP BY x, because ..." ? The first half of the example uses "SELECT *", and this bit was meant to be

Re: wrong field in example

2024-07-24 Thread David G. Johnston
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 c

Re: wrong field in example

2024-07-24 Thread David G. Johnston
On Wednesday, July 24, 2024, David Rowley wrote: > On Thu, 25 Jul 2024, 12:57 am David G. Johnston, < > david.g.johns...@gmail.com> wrote: > >> I think you mis-copied the query - the one on the page has “select x”, >> not “select *”. >> > > That text exists as it was quoted. What the report is la

Re: wrong field in example

2024-07-24 Thread David Rowley
On Thu, 25 Jul 2024, 12:57 am David G. Johnston, wrote: > I think you mis-copied the query - the one on the page has “select x”, not > “select *”. > That text exists as it was quoted. What the report is lacking is an indication of what is wrong with the text. David >

Re: wrong field in example

2024-07-24 Thread David G. Johnston
On Tuesday, July 23, 2024, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/queries-table-expressions.html > Description: > > >> In the second query, we could not have written SELECT * FROM test1 GROUP >

wrong field in example

2024-07-24 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/queries-table-expressions.html Description: >> In the second query, we could not have written SELECT * FROM test1 GROUP BY x, because there is no single value for the column y that could b