Fix crash/valgrind error

Fix for commit 9ef1851685b: We have to skip indexes where sortopfamily
is NULL.  This takes the place of the previous btree check.  Detected
by valgrind on the buildfarm.
pull/210/head
Peter Eisentraut 9 months ago
parent b4f453f6ab
commit ee1ae8b99f
  1. 4
      src/backend/utils/adt/selfuncs.c

@ -6329,6 +6329,10 @@ get_actual_variable_range(PlannerInfo *root, VariableStatData *vardata,
ScanDirection indexscandir;
StrategyNumber strategy;
/* Ignore non-ordering indexes */
if (index->sortopfamily == NULL)
continue;
/*
* Ignore partial indexes --- we only want stats that cover the entire
* relation.

Loading…
Cancel
Save