diff options
Diffstat (limited to 'src/backend/access/index/indexam.c')
-rw-r--r-- | src/backend/access/index/indexam.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 00c1d693766..2b27e732f13 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -722,11 +722,14 @@ index_vacuum_cleanup(IndexVacuumInfo *info, } /* ---------------- - * index_can_return - does index support index-only scans? + * index_can_return + * + * Does the index access method support index-only scans for the given + * column? * ---------------- */ bool -index_can_return(Relation indexRelation) +index_can_return(Relation indexRelation, int attno) { FmgrInfo *procedure; @@ -738,8 +741,9 @@ index_can_return(Relation indexRelation) GET_REL_PROCEDURE(amcanreturn); - return DatumGetBool(FunctionCall1(procedure, - PointerGetDatum(indexRelation))); + return DatumGetBool(FunctionCall2(procedure, + PointerGetDatum(indexRelation), + Int32GetDatum(attno))); } /* ---------------- |