Re: SELECT DISTINCT ON bug? - Mailing list pgsql-general

From Nigel J. Andrews
Subject Re: SELECT DISTINCT ON bug?
Date
Msg-id Pine.LNX.4.21.0305211053310.14538-100000@ponder.fairway2k.co.uk
Whole thread Raw
In response to Re: SELECT DISTINCT ON bug?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Responses Re: SELECT DISTINCT ON bug?  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
On Wed, 21 May 2003, Jean-Christian Imbeault wrote:

> Nigel J. Andrews wrote:
> >>
> >>I gather that to mean SELECT DISTINCT ON (*) , ...
> >>
> >>Is the syntax give by "\h select" wrong or am I misinterpreting it?
> >
> >
> > That's a misinterpretation I'm afraid. There is no comma shown before the *
> > that is not part of the expression for the DISTINCT ON.
>
> You mean "after the *" right? ;)

No, I was refering to the syntax you'd pasted from psql:

Syntax:
SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
    * | expression [ AS output_name ] [, ...]

Here the '*' I mention is on the second line of the statement and specifies the
returned columns.  Before that point the only comma that can occur is within
the brackets giving the expression(s) of the DISTINCT ON.

Sorry for confusing you more.

>
> After looking at it again I see how I misunderstood the syntax...

Easily done.


--
Nigel J. Andrews


pgsql-general by date:

Previous
From: Jean-Christian Imbeault
Date:
Subject: Re: SELECT DISTINCT ON bug?
Next
From: John Schickling
Date:
Subject: psql and ssl.