1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Tom Lane
2011-12-18 15:49:00 -05:00
parent 19d2231718
commit 3695a55513
15 changed files with 103 additions and 46 deletions

View File

@ -1091,3 +1091,14 @@ restart:
goto restart;
}
}
/*
* btcanreturn() -- Check whether btree indexes support index-only scans.
*
* btrees always do, so this is trivial.
*/
Datum
btcanreturn(PG_FUNCTION_ARGS)
{
PG_RETURN_BOOL(true);
}