Problem with DirectFunctionCall3(array_in,...)
От | Jessica Ditt |
---|---|
Тема | Problem with DirectFunctionCall3(array_in,...) |
Дата | |
Msg-id | 1114690289.4646.24.camel@localhost.localdomain обсуждение исходный текст |
Ответы |
Re: Problem with DirectFunctionCall3(array_in,...)
|
Список | pgsql-novice |
Hi!
At the moment I'm trying to create an own datatype "timeseries", which should contain among others an array of float8 values.
As far as I know, float8 is a base type of postgres and therefore I shouldn't need to create an own array-type.
In my own C-function "timeseries_in()" I would like to use "array_in()" implemented in arrayfuncs.c. To insert a timestamp with timezone, I'm using
DirectFunctionCall3(timestamptz_in, CStringGetDatum(zeitstempel), ObjectIdGetDatum(InvalidOid), Int32GetDatum(-1));
and it works fine... Trying the same with
DirectFunctionCall3(array_in, CStringGetDatum(arraystring), ObjectIdGetDatum(20), Int32GetDatum(-1));
unfortunately smashes my postmaster...
Having done a lot of research, I can't spot the mistake. Does anyone know the problem or have a workaround for me?
Please tell me, if you want me to supply my source code or anything else...
MfG
Jessica
At the moment I'm trying to create an own datatype "timeseries", which should contain among others an array of float8 values.
As far as I know, float8 is a base type of postgres and therefore I shouldn't need to create an own array-type.
In my own C-function "timeseries_in()" I would like to use "array_in()" implemented in arrayfuncs.c. To insert a timestamp with timezone, I'm using
DirectFunctionCall3(timestamptz_in, CStringGetDatum(zeitstempel), ObjectIdGetDatum(InvalidOid), Int32GetDatum(-1));
and it works fine... Trying the same with
DirectFunctionCall3(array_in, CStringGetDatum(arraystring), ObjectIdGetDatum(20), Int32GetDatum(-1));
unfortunately smashes my postmaster...
Having done a lot of research, I can't spot the mistake. Does anyone know the problem or have a workaround for me?
Please tell me, if you want me to supply my source code or anything else...
MfG
Jessica
В списке pgsql-novice по дате отправления: