pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg 9.1beta3 typo in 7.2.3
2+ messages / 2 participants
[nested] [flat]

* pg 9.1beta3 typo in 7.2.3
@ 2011-07-15 08:41  Gavin Flower <GavinFlower@archidevsys.co.nz>
  0 siblings, 1 reply; 2+ messages in thread

From: Gavin Flower @ 2011-07-15 08:41 UTC (permalink / raw)
  To: pgsql-docs

I think that there is a typo in the paragraph: 'x' used instead of 'y' 
in 'GROUP BY'.

postgres-9.1beta3/share/doc/html/queries-table-expressions.html


7.2.3. The GROUP BY and HAVING Clauses
[...]
=> 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 could be 
associated with each group. The grouped-by columns can be referenced in 
the select list since they have a single value in each group.
[...]

The paragraph should read "...SELECT * FROM test1 GROUP BY y..."


Cheers,
Gavin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pg 9.1beta3 typo in 7.2.3
@ 2011-07-15 14:51  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Gavin Flower <GavinFlower@archidevsys.co.nz>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2011-07-15 14:51 UTC (permalink / raw)
  To: Gavin Flower <GavinFlower@archidevsys.co.nz>; +Cc: pgsql-docs

Gavin Flower <GavinFlower@archidevsys.co.nz> writes:
> I think that there is a typo in the paragraph: 'x' used instead of 'y' 
> in 'GROUP BY'.

You're mistaken.  However, possibly the example is a bit confusing,
because the point is that "SELECT *" includes y, which can't be validly
referenced.  Maybe we should spell out "x, y" instead of writing "*".

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-07-15 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-07-15 08:41 pg 9.1beta3 typo in 7.2.3 Gavin Flower <GavinFlower@archidevsys.co.nz>
2011-07-15 14:51 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox