Re: bugfix - VIP: variadic function ignore strict flag - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: bugfix - VIP: variadic function ignore strict flag
Date
Msg-id 162867791002090846u4c0f92adu31f9968064f9578c@mail.gmail.com
Whole thread Raw
In response to Re: bugfix - VIP: variadic function ignore strict flag  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: bugfix - VIP: variadic function ignore strict flag
List pgsql-hackers
2010/2/9 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> +             /*
>> +              * If function has variadic argument, skip calling
>> +              * when variadic array contains NULL values.
>> +              */
>
> I don't think this is right at all.  The strict check ought to apply to
> the array argument as a whole.

yes, this isn't clear. My arguments for change:

a) the behave depends on types - "any" is different than others.

b) optimization over fmgr doesn't work now.

b1. some possible const null and strict are ignored
b2. array is non const always - so pre eval doesn't work for variadic

c) it could be confusing, and it is partially confusing.

point c could be solved by notice in documentation. But a and b are
problem. The variadic funcall cannot be optimized :(

Regards
Pavel Stehule


>
>                        regards, tom lane
>


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Avoiding bad prepared-statement plans.
Next
From: Heikki Linnakangas
Date:
Subject: Re: Streaming replication in docs