Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 695B19FB33C for ; Tue, 10 Apr 2007 04:36:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 12708-04 for ; Tue, 10 Apr 2007 04:36:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from developer.pgadmin.org (developer.pgadmin.org [63.246.23.140]) by postgresql.org (Postfix) with ESMTP id E4E519FA6B5 for ; Tue, 10 Apr 2007 04:36:14 -0300 (ADT) Received: from [172.24.32.108] ([62.232.55.118]) (authenticated bits=0) by developer.pgadmin.org (8.13.8/8.13.8) with ESMTP id l3A7XmYN026957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Apr 2007 07:33:49 GMT Message-ID: <461B3E6A.8080007@postgresql.org> Date: Tue, 10 Apr 2007 08:36:10 +0100 From: Dave Page User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: Andrew Hammond CC: CAJ CAJ , pgsql-general@postgresql.org Subject: Re: programmatic way to fetch latest release for a given major.minor version References: <1176155240.221125.319880@y80g2000hsf.googlegroups.com> <467669b30704091526v79ae044boe7217cc0777dce1f@mail.gmail.com> <5a0a9d6f0704091534i4e4af90co2dad0e9e0b60efee@mail.gmail.com> In-Reply-To: <5a0a9d6f0704091534i4e4af90co2dad0e9e0b60efee@mail.gmail.com> X-Enigmail-Version: 0.94.1.2 OpenPGP: url=http://www.pgadmin.org/pgp/davepage.pgp Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/417 X-Sequence-Number: 112320 Andrew Hammond wrote: > On 4/9/07, CAJ CAJ wrote: >> On 9 Apr 2007 14:47:20 -0700, Andrew Hammond >> wrote: >> > I'm writing a script that wants to know the latest release for a given >> > major.minor version. Is there some better way than parsing >> > http://www.postgresql.org/ftp/source/ or trying to >> connect to ftp >> > (which is invariably timing out on me today. Is that box getting >> > hammered or something?) and doing the parsing that? Both approaches >> > feel quite awkward to me. >> >> Use wget to download via HTTP (added recently). Probably wise to add a >> couple mirrors in your script. > > I'm not asking how to download stuff. I'm asking how to figure out the > current release number for a given major.minor. I thought that was > clear in my original post, but I guess not. For example, how do I > determine (programmatically) the lastest version of 8.1. Currently you can't without parsing pages. > I'm also interested in a clever way to select one of the "close" > mirrors at random for downloading via http. However I had planned to > hold that question until I'd solved the first issue. You might find this of use: http://www.postgresql.org/mirrors.xml. It's updated regularly, so the mirrors should all have test OK within the last 48 hours. Regards, Dave.