Hi all,

On Tue, Sep 15, 2026 at 3:20 PM shihao zhong <[email protected]> wrote:
>
> Hi hackers,
>
> The support functions for unnest() and the integer variants of
> generate_series() have no regression tests for their row estimates.
>
> They were added in v12, before planner_est.sql existed.  The numeric
> and timestamp variants got tests together with their support
> functions.
>
> The attached patch adds sections for both, following the existing
> style.  Test changes only.
>


Thank you for the patch. I reviewed the patch and tested it on my
local PostgreSQL tree. The patch applies cleanly and is limited to
regression test changes in planner_est.sql and planner_est.out. I ran
the focused regression test: # All 245 tests passed. I manually
verified the added cases for both generate_series() and unnest(). The
row estimates matched the expected behavior for normal, stepped,
descending, bigint, and large-range generate_series() cases. The empty
and NULL cases correctly show an estimate of 1 after clamping, and the
zero-step case falls back to the default estimate and raises the
expected error during execution. For unnest(), I verified constant and
multidimensional arrays, empty/NULL arrays, ArrayExpr,
statistics-based estimation, and the default estimate when
array-column statistics are unavailable. The observed results matched
the expected regression output. I did not find any functional issues
with the patch.
One minor comment clarification could be considered: the comment for
the constant NULL generate_series() case says "-- Ensure a constant
NULL argument estimates no rows", while the final planner estimate is
1 due to clamping. This could perhaps be worded consistently with the
corresponding unnest() test.
Apart from this minor wording point, the patch looks good to me.

Regards,
Solai


Reply via email to