compiling c-function on various version

From: "Hitoshi Harada" <hitoshi_harada(at)forcia(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: compiling c-function on various version
Date: 2006-11-02 13:53:52
Message-ID: 200611021355.kA2DtqGD005540@mbox33.po.2iij.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2006-11-02 14:08:12 Re: Grouping My query
Previous Message Christopher Browne 2006-11-02 13:32:08 Re: time value '24:00:00'