Re: How to check the postgresql version - Mailing list pgsql-hackers

From Neil Conway
Subject Re: How to check the postgresql version
Date
Msg-id 41A06BE4.1060607@samurai.com
Whole thread Raw
In response to How to check the postgresql version  (Ruey-Lung Hsiao <rlhsiao@gmail.com>)
Responses Re: How to check the postgresql version
List pgsql-hackers
Ruey-Lung Hsiao wrote:
>   My problem is: I can't find a way to compare strings in C preprocessor 
> directive since PG_VERSION is defined as something like "7.4.3" or 
> "7.4.6".

You could try using CATALOG_VERSION_NO in src/include/catversion.h as a 
substitute for the version number.

I think it would probably be a good idea to add a PG_VERSION-workalike 
that is more amenable to use with cpp, though.

-Neil


pgsql-hackers by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: Error handling in plperl and pltcl
Next
From: Thomas Hallgren
Date:
Subject: Re: Error handling in plperl and pltcl