Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 2AAC79FB7FC; Tue, 10 Apr 2007 11:26:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 75098-03-2; Tue, 10 Apr 2007 11:25:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 99D559FB7EB; Tue, 10 Apr 2007 11:25:55 -0300 (ADT) Received: from perhan.alvh.no-ip.org (201-221-221-161.bk12-dsl.surnet.cl [201.221.221.161]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l3AEPdLa032545; Tue, 10 Apr 2007 07:25:39 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 050F5329F4; Tue, 10 Apr 2007 10:25:36 -0400 (CLT) Date: Tue, 10 Apr 2007 10:25:35 -0400 From: Alvaro Herrera To: Dave Page Cc: Magnus Hagander , Andrew Hammond , CAJ CAJ , pgsql-general@postgresql.org, pgsql-www Subject: Re: Re: [GENERAL] programmatic way to fetch latest release for a given major.minor version Message-ID: <20070410142535.GB7786@alvh.no-ip.org> Mail-Followup-To: Dave Page , Magnus Hagander , Andrew Hammond , CAJ CAJ , pgsql-general@postgresql.org, pgsql-www References: <20070410081558.GB24976@svr2.hagander.net> <461B5064.8010004@postgresql.org> <20070410101852.GC24976@svr2.hagander.net> <461B6F10.3040800@postgresql.org> <20070410111509.GF24976@svr2.hagander.net> <461B768A.8070402@postgresql.org> <20070410122708.GB25739@svr2.hagander.net> <461B8D60.6080004@postgresql.org> <20070410135708.GA7786@alvh.no-ip.org> <461B9B4F.4070208@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <461B9B4F.4070208@postgresql.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 10 Apr 2007 07:25:42 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/31 X-Sequence-Number: 11781 Dave Page escribió: > Alvaro Herrera wrote: > > Dave Page escribió: > >> Magnus Hagander wrote: > >>> That is actually precisely my point. It makes *no sense* to filter based on > >>> 8.x. 8.0 is no more a major release than 7.4. > >> Yes it is - that's precisely why it was 8.0 and not 7.5. > > > > That was merely a marketing artifact; it was called 7.5 until the very > > end of the devel cycle. > > Yes, but marketing is one reason why someone might want to group 8.x, > 7.x etc on a website which is exactly the sort of thing this code is for. Ah, but then it's not an decision to be made on arithmetics alone -- you have to build a higher-level semantic comparison. Because if you want to group by something else, for example the quality of Windows support, you surely don't want 8.0 nor 8.1, because they have unfixable problems (the pgstat bug, autovacuum not working). You need to include only 8.2 and higher. > As others have said, yes, you could do it but looking at a substring of > the version, and yes, you could do it with mathematical comparisons on > major.minor (with limitations - what happens if we get to 8.10 ?), but > would we suggest people use those techniques for searching their > databases for matching records, or would we suggest storing the > interesting elements in different columns for ease of use, flexibility > and efficiency? How does this differ (aside from the obvious)? It makes sense to store things separately when they have a semantic difference. What we call "major" is the first two digits and dot. We call "minor" to the third digit, and that's all. We don't have "revisions". This is how it has ever been and we even document it as such. Offering the first two digits separately would be a mistake because it causes confusion over what's significant -- the first digit by itself is not significant. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support