Re: proposal: fix corner use case of variadic fuctions usage - Mailing list pgsql-hackers

From Tom Lane
Subject Re: proposal: fix corner use case of variadic fuctions usage
Date
Msg-id 26966.1358709990@sss.pgh.pa.us
Whole thread Raw
In response to Re: proposal: fix corner use case of variadic fuctions usage  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: proposal: fix corner use case of variadic fuctions usage
Re: proposal: fix corner use case of variadic fuctions usage
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sat, Jan 19, 2013 at 3:27 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> That's utter nonsense.  Why wouldn't people expect concat(), for
>> example, to work for large (or even just moderate-sized) arrays?

> /me blinks.

> What does that have to do with anything?  IIUC, the question isn't
> whether CONCAT() would work for large arrays, but rather for very
> large numbers of arrays written out as CONCAT(a1, ..., a10000000).

No, the question is what happens with CONCAT(VARIADIC some-array-here),
which currently just returns the array as-is, but which really ought
to concat all the array elements as if they'd been separate arguments.

Pavel is claiming it's okay for that to fall over if the array has
more than 100 elements.  I disagree, not only for the specific case of
CONCAT(), but with the more general implication that such a limitation
is going to be okay for any VARIADIC ANY function that anyone will ever
write.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Further pg_upgrade analysis for many tables
Next
From: Tom Lane
Date:
Subject: Re: Further pg_upgrade analysis for many tables