Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace

From: Chris Bitmead <chris(at)bitmead(dot)com>
To: pgsql-hackers(at)postgreSQL(dot)org, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace
Date: 2000-01-25 02:41:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-sql
Tom Lane wrote:
> If I don't hear loud hollers very soon, I'm going to eliminate the
> DISTINCT ON "feature" for 7.0.  As previously discussed, this feature
> is not standard SQL and has no clear semantic interpretation.

I don't feel overly strongly about this, but if I remember right you can
do some pretty cool things with this feature, provided you do define
some semantics clearly. Like I think you can find the first tuple
(given some ORDER BY clause) that fulfills some criteria. I think it is

SELECT DISTINCT ON name name, age ORDER BY age;

will get the youngest person. This might not be clearly specified now,
as long as it's useful, how about clearly defining it? I don't know that
there is an easy way of doing this in standard SQL. I don't see any
problems with useful extensions to SQL. If people want standards, they
don't have to use it.

In response to


pgsql-hackers by date

Next:From: Don BaccusDate: 2000-01-25 02:41:37
Subject: Re: [HACKERS] Happy column dropping
Previous:From: Tom LaneDate: 2000-01-25 02:39:39
Subject: Re: [HACKERS] Re: pg_dump possible fix, need testers.

pgsql-sql by date

Next:From: Mike MascariDate: 2000-01-25 02:50:45
Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace
Previous:From: Tom DonaldsonDate: 2000-01-25 01:54:51
Subject: JDK1.2 Driver to Postgresql 6.5.3 - connection problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group