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

Re: Finding the pqlib version

From: Christoph Zwerschke <cito(at)online(dot)de>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Finding the pqlib version
Date: 2006-02-11 16:03:30
Message-ID: 43EE0AD2.1050701@online.de (view raw or flat)
Thread:
Lists: pgsql-interfaces
Bruce Momjian wrote:
> You want the server version.  In PostgreSQL 8.0 and later you can use
> libpq's PQserverVersion(), but for pre-8.0, I think you have to do
> SELECT version(), and parse that:

I'd prefer something defined in the Postgres include files that can be 
checked by the precompiler already. In Python, the version information 
with major, minor and micro is defined in patchlevel.h and can be used 
for conditional compilation. It would be nice if something like this 
existed also for Postgres. I noticed pg_config.h has PG_VERSION, but it 
is the compound version of major, minor and micro including the dots 
which cannot be easily compared.

-- Christoph

In response to

pgsql-interfaces by date

Next:From: Tom LaneDate: 2006-02-11 17:39:37
Subject: Re: Finding the pqlib version
Previous:From: Christoph ZwerschkeDate: 2006-02-11 15:44:43
Subject: Re: Finding the pqlib version

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