From: | Ruslan A Dautkhanov <rusland(at)scn(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Joe Conway <mail(at)joeconway(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Creating server-side functions: one simple error |
Date: | 2002-10-11 08:27:58 |
Message-ID: | 3DA68B8E.6C28E742@scn.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tom Lane wrote:
> Ruslan A Dautkhanov <rusland(at)scn(dot)ru> writes:
> > SPI, and I have trap again - I can't translate datetime column, which
> > pass to my procedure. I must convert it to UNIX 1970-seconds counter for
> > my internal needs, but I havn't found _any_ PG_GETARG_* function in fmgr.h,
> > which can read time types as procedure's arguments.
>
> Not all the GETARG functions are in fmgr.h, only the most widely used
> types. See utils/timestamp.h.
Hi! Yes, you right, it's works well - I'm using PG_GETARG_TIMESTAMPTZ()
from utils/timestamp.h. But I have another problem when I try to compile procedure
with my own library, which used C++-like things. More exactly, problem begins
when I include .h file - it's not compiled since it used C++ constructions.
That is why I had renamed .c file to .cc - gcc understand source as C++ code now.
After this I have no problems in my header files, but have many in PG's
header files, for example:
1. In file included from /usr/home/rd/postgresql/src/include/executor/spi.h:22,
from remain_time.cc:2:
/usr/home/rd/postgresql/src/include/nodes/primnodes.h:529: syntax error before `using'
2. In file included from /usr/home/rd/postgresql/src/include/nodes/relation.h:18,
from /usr/home/rd/postgresql/src/include/executor/spi.h:23,
from remain_time.cc:2:
/usr/home/rd/postgresql/src/include/nodes/parsenodes.h:967: syntax error before `typename'
... (other similar errors on different parsenodes.h's lines)
... other errors on PG's headers when I tries to create procedure as C++ function.
Is this mean, that PostgreSQL not C++-ready for compiling server-side functions, doesn't it?
Is any methods exists for compiling procedure in C++ (namespace modifications etc)??
Thanks for your help.
---
best regards,
Ruslan A Dautkhanov rusland(at)scn(dot)ru
From | Date | Subject | |
---|---|---|---|
Next Message | elein | 2002-10-11 22:15:50 | Re: Creating server-side functions: one simple error |
Previous Message | Tom Lane | 2002-10-10 14:30:33 | Re: Bug #795: null resulting from left join corrupts select |