pgsql: Avoid crash in estimate_array_length with null root pointer.

2024-10-09 Thread Tom Lane
Avoid crash in estimate_array_length with null root pointer. Commit 9391f7152 added a "PlannerInfo *root" parameter to estimate_array_length, but failed to consider the possibility that NULL would be passed for that, leading to a null pointer dereference. We could rectify the particular case show

pgsql: Avoid crash in estimate_array_length with null root pointer.

2024-10-09 Thread Tom Lane
Avoid crash in estimate_array_length with null root pointer. Commit 9391f7152 added a "PlannerInfo *root" parameter to estimate_array_length, but failed to consider the possibility that NULL would be passed for that, leading to a null pointer dereference. We could rectify the particular case show