Re: Return setof values from C-function
От | Merlin Moncure |
---|---|
Тема | Re: Return setof values from C-function |
Дата | |
Msg-id | CAHyXU0ykfevyNVXYOzq3hXP2qsAPvBcyFfB-A3Q_nd0CQvXiMA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Return setof values from C-function (Yuriy Rusinov <yrusinov@gmail.com>) |
Ответы |
Re: Return setof values from C-function
|
Список | pgsql-general |
On Tue, Dec 10, 2013 at 9:44 AM, Yuriy Rusinov <yrusinov@gmail.com> wrote: > I have added code > > Oid * oids = (Oid *)palloc (2*sizeof (Oid)); > oids[0] = INT8OID; > oids[1] = FLOAT8OID; > if (get_call_result_type(fcinfo, oids, &tupdescRes) != > TYPEFUNC_COMPOSITE) > ereport(ERROR, > (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), > errmsg("function returning record called in context " > "that cannot accept type record"))); > > and try to obtain tupdescRes from get_call_result_type function, before > this I do > > create type hist_point as (inum bigint, bin float8); > and > create or replace function histogram (varchar, float8, float8, int4) returns > setof hist_point > as '$libdir/libfloader.so', 'histogram' language 'c' strict security > definer; > > but the result does not obtained. what error are you getting? Also, I think you are not properly initializing NULLs array -- that could be your issue. merlin
В списке pgsql-general по дате отправления: