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

From Jean-Christian Imbeault
Subject Re: SELECT DISTINCT ON bug?
Date
Msg-id 3ECB3401.7050103@mega-bucks.co.jp
Whole thread Raw
In response to SELECT DISTINCT ON bug?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Responses Re: SELECT DISTINCT ON bug?
Re: SELECT DISTINCT ON bug?
List pgsql-general
Martijn van Oosterhout wrote:
>
> Drop the comma after the distinct on.
>
> SELECT distinct on(dai_genres.id) dsc from dai_genres,

Ok, that worked. But accroding to "\h select" the syntax is:

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


I gather that to mean SELECT DISTINCT ON (*) , ...

Is the syntax give by "\h select" wrong or am I misinterpreting it?

Thanks,

--

Jean-Christian Imbeault


pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: SELECT DISTINCT ON bug?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: SELECT DISTINCT ON bug?