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

Re: Patch for DBD::Pg pg_relcheck problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ian Barwick <barwick(at)gmx(dot)net>
Cc: dbi-dev(at)perl(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Patch for DBD::Pg pg_relcheck problem
Date: 2002-12-09 23:47:30
Message-ID: 20819.1039477650@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
Ian Barwick <barwick(at)gmx(dot)net> writes:
> So out with the candle wax and pins ;-). Am I right
> in thinking that the string returned by SELECT version()
> starts with the word "PostgreSQL" followed by:
>   a space;
>   a single digit indicating the major version number;
>   a full stop / decimal point;
>   a single digit indicating the minor version number;
> and either "interim release" number (e.g. ".1" in the case of 7.3.1), or
> "devel", "rc1" etc. ?

I would recommend parsing it the same way pg_dump does, see
_check_database_version().  Looks like it's basically skip-11-chars-
and-sscanf.  Note the lack of assumptions about numbers of digits.

In the next protocol version update (hopefully 7.4) I would like to see
the basic version string (eg, "7.3.1" or "7.4devel") delivered to the
client automatically during connection startup and then available from a
libpq inquiry function.  This would eliminate the need to call version()
explicitly and to know that you must skip "PostgreSQL " in its output.
However, it will only help for clients/libraries that are willing to
deal exclusively with 7.4-or-newer backends, so it will take a few
releases to become really useful.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-12-10 00:01:28
Subject: Re: DB Tuning Notes for comment...
Previous:From: Philip WarnerDate: 2002-12-09 23:47:28
Subject: Re: DB Tuning Notes for comment...

pgsql-interfaces by date

Next:From: Godson RetnaDate: 2002-12-10 13:23:58
Subject: FATAL 1: Password authentication failed
Previous:From: Ian BarwickDate: 2002-12-09 23:34:31
Subject: Re: Patch for DBD::Pg pg_relcheck problem

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