Re: [HACKERS] distinct. Is this the correct behaviour?

Поиск
Список
Период
Сортировка
От sszabo@bigpanda.com
Тема Re: [HACKERS] distinct. Is this the correct behaviour?
Дата
Msg-id 199910210240.WAA12470@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: [HACKERS] distinct. Is this the correct behaviour?  (Vince Vielhaber <vev@michvhf.com>)
Ответы Re: [HACKERS] distinct. Is this the correct behaviour?
Re: [HACKERS] distinct. Is this the correct behaviour?
Список pgsql-hackers
This seems to generally work in postgres for the simple cases I tried:select x from foo group by x order by min(y)

Now I don't know if there are any hidden gotchas in that (or wierdness
with the spec), but it also feels better to me than using distinct in this
case as well, because it seems to explicitly describe how you want y
ordered.

>Ok, well what I'm trying to do is write a web-based discussion forum.  I
>wanted to list the subjects in any particular forum, but also want them
>to be in the order in which they were first posted.  So if I have 10 
>comments on one subject which first started last month and the subject
>begun with a 'z', and another that was started today with the subject
>beginning with an 'A', I want the end result to be:
>
>zebras have stripes
>Always cross at the light
>
>as opposed to 10 lines about the zebras and only one on Always.  It
>seems elementary, but at the same time it seems complex.  Must mean
>it's time for bed.


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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: [HACKERS] distinct. Is this the correct behaviour?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [DOCS] Re: [HACKERS] Outline for PostgreSQL book