Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> Do you mean something like this?
> - else if (arrayexpr)
> + else if (arrayexpr && root != NULL)
> That'd at least be no worse than how it worked before
> estimate_array_length() tried to use statistics, so that seems reasonable
> to me.
Yeah, exactly, just fall back to the old behavior if no root.
regards, tom lane