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

From Jean-Christian Imbeault
Subject Re: SELECT DISTINCT ON bug?
Date
Msg-id 3ECB440E.10602@mega-bucks.co.jp
Whole thread Raw
In response to Re: SELECT DISTINCT ON bug?  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Responses Re: SELECT DISTINCT ON bug?
List pgsql-general
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? ;)

After looking at it again I see how I misunderstood the syntax. But I do
find it intuitive to say:

SELECT DISTINCT ON(c1) c2,c3 FROM ...

But I can live with it considering DISTINCT ON is non-standard SQL :)

--

Jean-Christian Imbeault


pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: SELECT DISTINCT ON bug?
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: SELECT DISTINCT ON bug?