]> granicus.if.org Git - postgresql/commit
Make plan_cluster_use_sort cope with no IndexOptInfo for the target index.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 20 Apr 2011 21:43:34 +0000 (17:43 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 20 Apr 2011 21:44:17 +0000 (17:44 -0400)
commit5b8e442953da0bf4950b86c7cb4a6117842aedf7
tree4d1a34151ba809c27a1c4798478df7f817e8603a
parent395fcac29906d22615ba68bd1dfa31daf691979e
Make plan_cluster_use_sort cope with no IndexOptInfo for the target index.

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.
src/backend/optimizer/plan/planner.c