Re: [HACKERS] strange behavior with C function and DEFAULT function parameters

2013-10-20 Thread Andrew Dunstan
On 10/20/2013 08:38 PM, 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 ;-)");

Re: [HACKERS] strange behavior with C function and DEFAULT function parameters

2013-10-20 Thread Tomas Vondra
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, "calle

[HACKERS] strange behavior with C function and DEFAULT function parameters

2013-10-20 Thread Tomas Vondra
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 access