Re: Error when defining a set returning function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error when defining a set returning function
Дата
Msg-id 4094099.1618583375@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Error when defining a set returning function  (Esteban Zimanyi <ezimanyi@ulb.ac.be>)
Ответы Re: Error when defining a set returning function
Список pgsql-hackers
Esteban Zimanyi <ezimanyi@ulb.ac.be> writes:
> Since I was receiving an error when defining a set returning function, I
> borrowed a function from PostgreSQL as follows
> ...
> When I execute this function I obtain

> select testSRF(1,10, 2);
> ERROR:  unrecognized table-function returnMode: 257

Hmm, I compiled this function up and it works for me:

regression=# select testSRF(1,10, 2);
 testsrf 
----------
        1
        3
        5
        7
(4 rows)

I think your "quick opt-out" code is a bit broken, because it fails to
restore the current memory context; but there's nothing wrong with the
main code path.

Hence, the problem is somewhere else.  The first theory that comes
to mind is that you're compiling against Postgres headers that
don't match the server version you're actually loading the code
into.  In theory the PG_MODULE_MAGIC infrastructure ought to catch
that, but maybe you've found some creative way to fool that :-(.
One way maybe would be if the headers were from some pre-release
v13 version that wasn't ABI-compatible with 13.0.

Or it could be something else, but I'd counsel looking for build
process mistakes, cause this C code isn't the problem.

            regards, tom lane



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: fix old confusing JSON example
Следующее
От: Justin Pryzby
Дата:
Сообщение: default_tablespace doc and partitioned rels