Received: from sapphire.albourne.com (root@sapphire.albourne.com [195.212.241.227]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA49259; Tue, 25 Jan 2000 02:16:13 -0500 (EST) (envelope-from a.joubert@albourne.com) Received: from albourne.com (akamas.albourne.com [195.212.241.254]) by sapphire.albourne.com (8.9.3/8.9.3/Albourne/CYS/1.8/MAPS) with ESMTP id JAA25164; Tue, 25 Jan 2000 09:16:07 +0200 (EET) Sender: a.joubert@albourne.com Message-ID: <388D4D9D.C4569FBC@albourne.com> Date: Tue, 25 Jan 2000 07:15:41 +0000 From: Adriaan Joubert X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.14 i686) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane CC: pgsql-hackers@postgreSQL.org, pgsql-sql@postgreSQL.org Subject: Re: [HACKERS] DISTINCT ON: speak now or forever hold your peace References: <2295.948765015@sss.pgh.pa.us> <388D0D55.84F13203@bitmead.com> <11547.948771949@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Tom Lane wrote: > Chris Bitmead 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