Re: SELECT DISTINCT ON bug?

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT DISTINCT ON bug?
Date: 2003-05-21 08:08:33
Message-ID: 3ECB3401.7050103@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message zhangyue 2003-05-21 08:10:23 about NULL
Previous Message Martijn van Oosterhout 2003-05-21 07:41:31 Re: SELECT DISTINCT ON bug?