Re: strange behavior with C function and DEFAULT function parameters

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: strange behavior with C function and DEFAULT function parameters
Дата
Msg-id 52647A04.5030600@fuzzy.cz
обсуждение исходный текст
Ответ на strange behavior with C function and DEFAULT function parameters  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-hackers
On 21.10.2013 02:38, Tomas Vondra wrote:
> Hi,
> 
> I ran into some pretty strange behavior of C-language function and
> default parameter values, both on 9.2 and 9.4devel. Consider for example
> this trivial C function:
> 
>     Datum
>     show_bug(PG_FUNCTION_ARGS) {
>     elog(WARNING, "called ;-)");
>     PG_RETURN_VOID();
>     }
> 
> which is accessed using this definition:
> 
>     CREATE FUNCTION show_bug(a TEXT DEFAULT NULL)
>     RETURNS void
>     AS 'bug.so'
>     LANGUAGE C STRICT;

Meh, never mind. About a second after submitting the message I've
noticed I defined the function STRICT, so it's actually absolutely
correct behavior.

Sorry for the noise.

Tomas



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: strange behavior with C function and DEFAULT function parameters
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: strange behavior with C function and DEFAULT function parameters