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

From: sszabo(at)bigpanda(dot)com
To: Vince Vielhaber <vev(at)michvhf(dot)com>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] distinct. Is this the correct behaviour?
Date: 1999-10-21 02:40:00
Message-ID: 199910210240.WAA12470@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-10-21 03:49:25 Re: [DOCS] Re: [HACKERS] Outline for PostgreSQL book
Previous Message Vince Vielhaber 1999-10-21 01:47:52 Re: [HACKERS] distinct. Is this the correct behaviour?