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

Re: [INTERFACES] Patch for DBD::Pg pg_relcheck problem

From: Ian Barwick <barwick(at)gmx(dot)net>
To: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-interfaces(at)postgresql(dot)org,pgsql-hackers(at)postgresql(dot)org
Subject: Re: [INTERFACES] Patch for DBD::Pg pg_relcheck problem
Date: 2002-12-10 16:35:47
Message-ID: 200212101735.47825.barwick@gmx.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
(no followup to dbi-dev(at)perl(dot)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 ;-). 

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(at)gmx(dot)net


In response to

pgsql-hackers by date

Next:From: Brian WalkerDate: 2002-12-10 16:47:16
Subject: Problem with foreign keys (performance and deadlocks)
Previous:From: Tom LaneDate: 2002-12-10 16:24:28
Subject: Re: Alter domain

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 2002-12-10 19:10:49
Subject: Re: FATAL 1: Password authentication failed
Previous:From: Lee KindnessDate: 2002-12-10 15:54:07
Subject: Re: [INTERFACES] Patch for DBD::Pg pg_relcheck problem

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