Re: Module dependency on PostgeSQL version - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Module dependency on PostgeSQL version
Date
Msg-id 23963.1084366029@sss.pgh.pa.us
Whole thread Raw
In response to Re: Module dependency on PostgeSQL version  ("Thomas Hallgren" <thhal@mailblocks.com>)
List pgsql-hackers
> Joe Conway wrote:
>> #if (CATALOG_VERSION_NO <= 200211021)
>> #define PG_VERSION_73_COMPAT
>> 
>> Since CATALOG_VERSION_NO doesn't change between major releases, it seems
>> to work pretty well.

That approach also has the nice property that it already works for all
releases back to 7.0, whereas anything we add now would only be useful
starting in 7.5 ...

"Thomas Hallgren" <thhal@mailblocks.com> writes:
> Your solution doesn't cover the situations when you have dependencies on
> patch versions though, does it? There's no way to distinguish between 7.4.1
> and 7.4.2 if the catalog version doesn't change.

Perhaps not, but I think it would be pretty risky to depend on an #ifdef
to tell you which backend minor version you're running in anyway.  Addon
libraries are unlikely to get upgraded at the same times that the
backend does, so it's certainly plausible that you could be running in a
later minor release than you were compiled with.  If people copy
executables between machines then the reverse is easily possible too.
The only real version tiedown we have at the moment is to put extension
libraries into a PG-version-specific $libdir, and that is not going to
narrow things more closely than the PG major version in most setups.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Configure redux.
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: Subtle pg_dump problem...