Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1F23747649E; Tue, 10 Dec 2002 11:37:52 -0500 (EST) Received: from lubitsch.akademie.de (ns.akademie.de [62.165.4.3]) by postgresql.org (Postfix) with ESMTP id C979F476801; Tue, 10 Dec 2002 11:35:52 -0500 (EST) Received: from pd9eb1897.dip.t-dialin.net ([217.235.24.151] helo=ianb.local) by lubitsch.akademie.de with asmtp (Exim 3.33 #2) id 18LnMT-0005rL-00; Tue, 10 Dec 2002 17:35:57 +0100 Content-Type: text/plain; charset="iso-2022-jp" From: Ian Barwick To: Lee Kindness Subject: Re: [INTERFACES] Patch for DBD::Pg pg_relcheck problem Date: Tue, 10 Dec 2002 17:35:47 +0100 X-Mailer: KMail [version 1.4] Cc: Tom Lane , pgsql-interfaces@postgresql.org, pgsql-hackers@postgresql.org References: <200212091631.00125.barwick@gmx.net> <200212101638.03642.barwick@gmx.net> <15862.3615.266952.454641@kelvin.csl.co.uk> In-Reply-To: <15862.3615.266952.454641@kelvin.csl.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200212101735.47825.barwick@gmx.net> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/588 X-Sequence-Number: 33043 (no followup to dbi-dev@perl.org, getting a little OT there) On Tuesday 10 December 2002 16:54, Lee Kindness wrote: > Ian Barwick writes: > > Something along the lines of > > char *PQversion(const PGconn *conn) ? > > Probably: > > int PQversion(const PGconn *conn) > > would be better, and easier to parse? For example the value returned > for 7.3.1 would be 7003001; for 7.4 7004000; for 101.10.2 > 101010002. This allows simple numerical tests... Sounds logical - I was evidently thinking in Perl ;-).=20 For reference pg_dump currently parses the SELECT version() string into an integer thus: 7.2 70200 7.2.1 70201 7.3devel 70300 7.3rc1 70300 7.3.1 70301 7.3.99 70399 7.399.399 110299 101.10.2 1011002 (and just for fun: "11i Enterprise Edition with Bells and Whistles " returns -1 ;-) which works with minor release numbers of 99 and below. Ian Barwick barwick@gmx.net