summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/indxpath.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-12-18 15:49:00 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-12-18 15:50:37 -0500
commit3695a555136a6d179cac8ae48d5f90171d5b30e9 (patch)
treeefb7fb5afb3dea1292c9a50635b53215cc548e64 /src/backend/optimizer/path/indxpath.c
parent19d223171801dda36f84e24dc89c9fbab1ababad (diff)
downloadpostgresql-3695a555136a6d179cac8ae48d5f90171d5b30e9.tar.gz
Replace simple constant pg_am.amcanreturn with an AM support function.
The need for this was debated when we put in the index-only-scan feature, but at the time we had no near-term expectation of having AMs that could support such scans for only some indexes; so we kept it simple. However, the SP-GiST AM forces the issue, so let's fix it. This patch only installs the new API; no behavior actually changes.
Diffstat (limited to 'src/backend/optimizer/path/indxpath.c')
-rw-r--r--src/backend/optimizer/path/indxpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index 74bc7ac7c6..fa6749a2f9 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -1075,10 +1075,10 @@ check_index_only(RelOptInfo *rel, IndexOptInfo *index)
ListCell *lc;
int i;
- /* Index-only scans must be enabled, and AM must be capable of it */
+ /* Index-only scans must be enabled, and index must be capable of them */
if (!enable_indexonlyscan)
return false;
- if (!index->amcanreturn)
+ if (!index->canreturn)
return false;
/*