Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-03 Thread Tom Lane
I wrote: Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Apr 1, 2014 at 2:23 PM, Tom Lane t...@sss.pgh.pa.us 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

[HACKERS] get_fn_expr_variadic considered harmful

2014-04-01 Thread Tom Lane
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[]. Such cases worked okay before 9.3, the reason being that the use of

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 t...@sss.pgh.pa.us 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

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Apr 1, 2014 at 12:52 PM, Tom Lane t...@sss.pgh.pa.us 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

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,

Re: [HACKERS] get_fn_expr_variadic considered harmful

2014-04-01 Thread Tom Lane
Andres Freund and...@2ndquadrant.com 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

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 t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Apr 1, 2014 at 12:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: In bug #9817 there's a complaint that the planner fails to consider these expressions equivalent: foo('a'::text,