Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-03 Thread Tom Lane
I wrote: > Robert Haas writes: >> Well, that argues for the choice of trying to make them equivalent >> again, I suppose, but it sounds like there are some nasty edge cases >> that won't easily be filed down. I think your idea of redefining >> funcvariadic to be true only for VARIADIC ANY is prob

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-02 Thread Tom Lane
Robert Haas writes: > On Tue, Apr 1, 2014 at 2:23 PM, Tom Lane wrote: >> There's also the point that even if we changed ruleutils' behavior >> now, this would not fix existing dump files that have considered the >> two forms interchangeable ever since VARIADIC existed. And we >> generally try ha

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-01 Thread Robert Haas
On Tue, Apr 1, 2014 at 2:23 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Apr 1, 2014 at 12:52 PM, Tom Lane wrote: >>> In bug #9817 there's a complaint that the planner fails to consider >>> these expressions equivalent: >>> foo('a'::text, 'b'::text) >>> foo(variadic array['a'::text, 'b':

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-01 Thread Tom Lane
Andres Freund writes: > On 2014-04-01 12:52:54 -0400, Tom Lane wrote: >> We could possibly salvage something by redefining funcvariadic as only >> being true if VARIADIC was used *and* the function is VARIADIC ANY, >> so that it returns to not being different for semantically-equivalent >> cases.

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-01 Thread Andres Freund
On 2014-04-01 12:52:54 -0400, Tom Lane wrote: > We could possibly salvage something by redefining funcvariadic as only > being true if VARIADIC was used *and* the function is VARIADIC ANY, > so that it returns to not being different for semantically-equivalent > cases. This would be a bit messy, s

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-01 Thread Tom Lane
Robert Haas writes: > On Tue, Apr 1, 2014 at 12:52 PM, Tom Lane wrote: >> In bug #9817 there's a complaint that the planner fails to consider >> these expressions equivalent: >> foo('a'::text, 'b'::text) >> foo(variadic array['a'::text, 'b'::text]) >> when foo() is declared as taking variadic tex

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-01 Thread Robert Haas
On Tue, Apr 1, 2014 at 12:52 PM, Tom Lane wrote: > In bug #9817 there's a complaint that the planner fails to consider > these expressions equivalent: > foo('a'::text, 'b'::text) > foo(variadic array['a'::text, 'b'::text]) > when foo() is declared as taking variadic text[]. My first r