Hi,
On 2018-11-05 08:10:17 +0000, PG Bug reporting form wrote:
> Here is some example:
>
> create table t(a int);
> insert into t select generate_series from generate_series(1, 100000);
> analyze t;
> set jit to on;
>
> explain analyze SELECT
> ARRAY( SELECT DISTINCT unnest(array[]::integer[] || t.a) AS unnest) AS
> c1,
> ARRAY( SELECT DISTINCT unnest(((((array[]::integer[]))) || t.a)) AS
> unnest) AS c2
> FROM t
> ;
>
> JIT:
> Functions: 600016
Clearly the problem is that we're generating an absolutely absurd number
of functions. I'll try to look into why soon.
Thanks for the reproducible test case!
I assume this isn't quite a real case, but something real reduced into a
small testcase?
Greetings,
Andres Freund