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

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

From: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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 07:15:41
Message-ID: 388D4D9D.C4569FBC@albourne.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-sql
Tom Lane wrote:

> Chris Bitmead <chris(at)bitmead(dot)com> writes:
> > 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.
>
> We did talk about that, but I didn't hear any strong support for doing
> it, as opposed to pulling the feature completely... in particular,
> I didn't hear anyone volunteering to do the work...

I've been using DISTINCT to fix things when vacuum gets into a mess (yes, it
happened again last night,
FATAL 1:  VACUUM (vc_rpfheap): BlowawayRelationBuffers returned -2
). I then have loads of duplicates in a table and by doing a SELECT DISTINCT
... INTO ... I can get rid of them. A few table renames later I'm back in
business. So how do I do this without DISTINCT?

Better would be of course to get rid of the BlowawayRelationBuffers problem.
I cannot reproduce it yet, but I think I can make it happen by running vacuum
and updating tables that are linked by triggers. Does this sound plausible?
And yes, I'm running on Alpha, i.e. 64 bits.

Adriaan


In response to

Responses

pgsql-hackers by date

Next:From: Hiroshi InoueDate: 2000-01-25 07:18:22
Subject: RE: [HACKERS] Happy column dropping
Previous:From: Michael MeskesDate: 2000-01-25 07:12:36
Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace

pgsql-sql by date

Next:From: Tom LaneDate: 2000-01-25 07:45:17
Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace
Previous:From: Michael MeskesDate: 2000-01-25 07:12:36
Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace

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