summaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_int4.c
diff options
context:
space:
mode:
authorHeikki Linnakangas2015-03-27 21:35:16 +0000
committerHeikki Linnakangas2015-03-27 21:35:16 +0000
commite09b48316c22fce727bce3c89fa64fc627787e6a (patch)
tree107a22f368efd340c6f545f0e6b7130b5063aa08 /contrib/btree_gist/btree_int4.c
parent735cd6128a6a401671126443a9af4324932a38d6 (diff)
Add index-only scan support to btree_gist.
inet, cidr, and timetz indexes still cannot support index-only scans, because they don't store the original unmodified value in the index, but a derived approximate value.
Diffstat (limited to 'contrib/btree_gist/btree_int4.c')
-rw-r--r--contrib/btree_gist/btree_int4.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/btree_gist/btree_int4.c b/contrib/btree_gist/btree_int4.c
index 221301c001d..ddbcf527467 100644
--- a/contrib/btree_gist/btree_int4.c
+++ b/contrib/btree_gist/btree_int4.c
@@ -16,6 +16,7 @@ typedef struct int32key
** int32 ops
*/
PG_FUNCTION_INFO_V1(gbt_int4_compress);
+PG_FUNCTION_INFO_V1(gbt_int4_fetch);
PG_FUNCTION_INFO_V1(gbt_int4_union);
PG_FUNCTION_INFO_V1(gbt_int4_picksplit);
PG_FUNCTION_INFO_V1(gbt_int4_consistent);
@@ -124,6 +125,13 @@ gbt_int4_compress(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(gbt_num_compress(entry, &tinfo));
}
+Datum
+gbt_int4_fetch(PG_FUNCTION_ARGS)
+{
+ GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
+
+ PG_RETURN_POINTER(gbt_num_fetch(entry, &tinfo));
+}
Datum
gbt_int4_consistent(PG_FUNCTION_ARGS)