aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsgistidx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/tsgistidx.c')
-rw-r--r--src/backend/utils/adt/tsgistidx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/utils/adt/tsgistidx.c b/src/backend/utils/adt/tsgistidx.c
index 732d87f22ff..578af5d5126 100644
--- a/src/backend/utils/adt/tsgistidx.c
+++ b/src/backend/utils/adt/tsgistidx.c
@@ -272,6 +272,10 @@ gtsvector_compress(PG_FUNCTION_ARGS)
Datum
gtsvector_decompress(PG_FUNCTION_ARGS)
{
+ /*
+ * We need to detoast the stored value, because the other gtsvector
+ * support functions don't cope with toasted values.
+ */
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
SignTSVector *key = (SignTSVector *) PG_DETOAST_DATUM(entry->key);