Re: how solve diff of API counstruct_md_array between 8.1 and 8.2?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: how solve diff of API counstruct_md_array between 8.1 and 8.2?
Дата
Msg-id 20060216194901.GJ26127@svana.org
обсуждение исходный текст
Ответ на how solve diff of API counstruct_md_array between 8.1 and 8.2?  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Ответы Re: how solve diff of API counstruct_md_array between  (Joe Conway <mail@joeconway.com>)
Список 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 по дате отправления:

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: how solve diff of API counstruct_md_array between 8.1 and 8.2?
Следующее
От: Andrew Dunstan
Дата:
Сообщение: time waiting on patch queue