Re: SELECT DISTINCT ON bug?

Поиск
Список
Период
Сортировка
От Nigel J. Andrews
Тема Re: SELECT DISTINCT ON bug?
Дата
Msg-id Pine.LNX.4.21.0305211053310.14538-100000@ponder.fairway2k.co.uk
обсуждение исходный текст
Ответ на Re: SELECT DISTINCT ON bug?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Ответы Re: SELECT DISTINCT ON bug?  (Bruno Wolff III <bruno@wolff.to>)
Список 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 по дате отправления:

Предыдущее
От: Jean-Christian Imbeault
Дата:
Сообщение: Re: SELECT DISTINCT ON bug?
Следующее
От: John Schickling
Дата:
Сообщение: psql and ssl.