Re: How to check the postgresql version

From: Neil Conway <neilc(at)samurai(dot)com>
To: Ruey-Lung Hsiao <rlhsiao(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to check the postgresql version
Date: 2004-11-21 10:20:20
Message-ID: 41A06BE4.1060607@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Hallgren 2004-11-21 10:22:03 Re: Error handling in plperl and pltcl
Previous Message Thomas Hallgren 2004-11-21 09:59:06 Re: Error handling in plperl and pltcl