Re: Passing NULL to a function called with OidFunctionCall3

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Passing NULL to a function called with OidFunctionCall3
Дата
Msg-id 20953.1320972182@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Passing NULL to a function called with OidFunctionCall3  (Bborie Park <bkpark@ucdavis.edu>)
Ответы Re: Passing NULL to a function called with OidFunctionCall3  (Bborie Park <bkpark@ucdavis.edu>)
Список pgsql-general
Bborie Park <bkpark@ucdavis.edu> writes:
> I'm trying to make use of OidFunctionCall3 and am wondering how to
> resolve an issue.  I need to be able to pass to the function called with
> OidFunctionCall3 a NULL and am having difficulty figuring out how.

You can't.  Those convenience functions are not designed to support null
arguments (nor null results, for that matter).  If they did, they'd be
so much more complicated to use as to not be worth the bother.

You'll need to write out something comparable to what OidFunctionCall3
does internally; look into fmgr.c.  It would behoove you also to make
sure that the function is not strict before you call it with a null,
because a function that is strict is entirely entitled to dump core
on you if you do that.

            regards, tom lane

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

Предыдущее
От: Tarlika Elisabeth Schmitz
Дата:
Сообщение: Re: PL/pgSQL: SELECT INTO variables - no result
Следующее
От: Bborie Park
Дата:
Сообщение: Re: Passing NULL to a function called with OidFunctionCall3