Re: SELECT DISTINCT ON bug?

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT DISTINCT ON bug?
Date: 2003-05-21 09:17:02
Message-ID: 3ECB440E.10602@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Simon Heinrich 2003-05-21 09:18:42 get SYSID of current user as var for query
Previous Message Nigel J. Andrews 2003-05-21 08:58:22 Re: SELECT DISTINCT ON bug?