compiling c-function on various version

Поиск
Список
Период
Сортировка
От Hitoshi Harada
Тема compiling c-function on various version
Дата
Msg-id 200611021355.kA2DtqGD005540@mbox33.po.2iij.net
обсуждение исходный текст
Ответы Re: compiling c-function on various version  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Is there any way to compile c-function using pre-processor macro??

The code below is able to be compiled on 8.1.4:
---
if(timestamp2tm(timestamp, NULL, tm, &fsec, NULL, NULL ) != 0){
    // error
}
---
but not on 8.0.4, since the arguments of timestamp2tm() are changed.

I tried like this:
---
timestamp2tm(timestamp, NULL, tm, &fsec, NULL
#if PG_VERSION > 8.1
,NULL
#endif
)
---
but couldn't, PG_VERSION is string type.
any other macro or definitions??

Regards,

Hitoshi Harada



В списке pgsql-general по дате отправления:

Предыдущее
От: Peter
Дата:
Сообщение: Weird double single quote issue
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: Grouping My query