pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Zwerschke <cito@online.de>
To: pgsql-interfaces@postgresql.org
Subject: Re: Finding the pqlib version
Date: Sat, 11 Feb 2006 17:03:30 +0100
Message-ID: <43EE0AD2.1050701@online.de> (raw)
In-Reply-To: <200602111501.k1BF1i017587@candle.pha.pa.us>
References: <200602111501.k1BF1i017587@candle.pha.pa.us>

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



view thread (33+ messages)  latest in thread

Message-ID: <43EE0AD2.1050701@online.de>
Permalink:  ../43EE0AD2.1050701@online.de/
Also on:    postgresql.org/message-id/43EE0AD2.1050701@online.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: cito@online.de
  Subject: Re: Finding the pqlib version
  In-Reply-To: <43EE0AD2.1050701@online.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox