• Tom Lane's avatar
    Make plan_cluster_use_sort cope with no IndexOptInfo for the target index. · 5b8e4429
    Tom Lane authored
    The original coding assumed that such a case represents caller error, but
    actually get_relation_info will omit generating an IndexOptInfo for any
    index it thinks is unsafe to use.  Therefore, handle this case by returning
    "true" to indicate that a seqscan-and-sort is the preferred way to
    implement the CLUSTER operation.  New bug in 9.1, no backpatch needed.
    Per bug #5985 from Daniel Grace.
    5b8e4429
planner.c 97.6 KB