Re: Problem with ORDER BY and DISTINCT ON

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with ORDER BY and DISTINCT ON
Дата
Msg-id 24728.1217544692@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem with ORDER BY and DISTINCT ON  (Steve Midgley <public@misuse.org>)
Ответы Re: Problem with ORDER BY and DISTINCT ON  (Steve Midgley <public@misuse.org>)
Список pgsql-sql
Steve Midgley <public@misuse.org> writes:
> At 07:29 AM 7/16/2008, Tom Lane wrote:
>> I think what is happening is that ORDER BY knows that and gets rid of
>> the duplicate entries while DISTINCT ON fails to do so.

> Of course removing the duplicate from both areas is the correct 
> solution and I broke down and hacked that into the auto-sql-writing 
> code and so my immediate problem is solved. I'm happy to file this as a 
> ticket for Pg (please point me to your ticket tool as I've never used 
> it). This is not a very big deal but Pg has such a high compliance with 
> wacky-but-valid SQL it does seem like it should be fixed just because. 

I've applied a patch for this to CVS HEAD.  I doubt we'll try to fix it
in the back branches, though --- it's too much of a corner case to be
worth taking any risk of breaking other stuff.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Marcin Stępnicki"
Дата:
Сообщение: Function returning setof taking parameters from another table
Следующее
От: Steve Midgley
Дата:
Сообщение: Re: Problem with ORDER BY and DISTINCT ON