On 01/11/2026 01:55, Manu wrote:
v4 keeps today's names: no existing expected output changes, and a 4000-arm UNION plans in 22 ms (v18 18.6 ms, master 16.9 s) with the same planner memory as master. If you would still rather have the single counter, that version is ready too.
Aside: The last test on:
+-- a name of NAMEDATALEN - 1 bytes, used twice +EXPLAIN (COSTS OFF) +WITH nnnnnnnnnnnnnnnnnnn This isn't a concern anymore so we don't need this i think? Also v3 had this test: +EXPLAIN (COSTS OFF) +SELECT (SELECT 1 WHERE random() >= 0), + (WITH expr_1 AS MATERIALIZED (SELECT 2 AS x) SELECT x FROM expr_1); + QUERY PLAN +---------------------------------------------------------------- + Result + InitPlan expr_1 + -> Result + One-Time Filter: (random() >= '0'::double precision) + InitPlan expr_2 + -> CTE Scan on expr_1 + CTE expr_1_1 + -> Result +(8 rows) + I guess we should keep this for expr_1_1 case ... Regards, Ayoub
