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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-interfaces by date

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