Zhihong Yu <zyu@yugabyte.com> writes:
> Hi,
> if (heapRel == NULL || heapoid != IndexGetRelation(indexoid, false))
> ereport(ERROR,
> I wonder why the above check is not placed in the else block:
> else
> heapRel = NULL;
Because we don't want to throw that error until we've exhausted the
possibilities for throwing other errors.
regards, tom lane