Re: how solve diff of API counstruct_md_array between 8.1 and 8.2? - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: how solve diff of API counstruct_md_array between 8.1 and 8.2?
Date
Msg-id 20060216194901.GJ26127@svana.org
Whole thread Raw
In response to how solve diff of API counstruct_md_array between 8.1 and 8.2?  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Responses Re: how solve diff of API counstruct_md_array between
List pgsql-hackers
On Thu, Feb 16, 2006 at 08:36:34PM +0100, Pavel Stehule wrote:
> Hello
>
> I use counstruct_md_array function in my Orafunc module. CVS version has
> diff def now. I am findig way for simple solution of maintaince source code
> for both version. I have PG_VERSION variable, but it's unusable. Is there
> way for contrib's autors differentiate PostgreSQL versions? I don't want to
> have two versions of source code.

For my stuff I've generally use CATALOG_VERSION_NO. It's not very easy,
but by looking through CVS you can find when the function was created
and in your code use:

#ifdef CATALOG_VERSION_NO > yyyymmddN
/* New stuff */
#else
/* Old stuff */
#endif

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: how solve diff of API counstruct_md_array between 8.1 and 8.2?
Next
From: Andrew Dunstan
Date:
Subject: time waiting on patch queue