diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-03-27 23:35:16 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-03-27 23:35:16 +0200 |
commit | e09b48316c22fce727bce3c89fa64fc627787e6a (patch) | |
tree | 107a22f368efd340c6f545f0e6b7130b5063aa08 /contrib/btree_gist/btree_time.c | |
parent | 735cd6128a6a401671126443a9af4324932a38d6 (diff) | |
download | postgresql-e09b48316c22fce727bce3c89fa64fc627787e6a.tar.gz postgresql-e09b48316c22fce727bce3c89fa64fc627787e6a.zip |
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_time.c')
-rw-r--r-- | contrib/btree_gist/btree_time.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c index a620e4a23c0..41d99592146 100644 --- a/contrib/btree_gist/btree_time.c +++ b/contrib/btree_gist/btree_time.c @@ -19,6 +19,7 @@ typedef struct */ PG_FUNCTION_INFO_V1(gbt_time_compress); PG_FUNCTION_INFO_V1(gbt_timetz_compress); +PG_FUNCTION_INFO_V1(gbt_time_fetch); PG_FUNCTION_INFO_V1(gbt_time_union); PG_FUNCTION_INFO_V1(gbt_time_picksplit); PG_FUNCTION_INFO_V1(gbt_time_consistent); @@ -192,6 +193,13 @@ gbt_timetz_compress(PG_FUNCTION_ARGS) PG_RETURN_POINTER(retval); } +Datum +gbt_time_fetch(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0); + + PG_RETURN_POINTER(gbt_num_fetch(entry, &tinfo)); +} Datum gbt_time_consistent(PG_FUNCTION_ARGS) |