1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Remove no-op GiST support functions in the core GiST opclasses.

The preceding patch allowed us to remove useless GiST support functions.
This patch actually does that for all the no-op cases in the core GiST
code.  This buys us whatever performance gain is to be had, and more
importantly exercises the preceding patch.

There remain no-op functions in the contrib GiST opclasses, but those
will take more work to remove.

Discussion: https://postgr.es/m/CAJEAwVELVx9gYscpE=Be6iJxvdW5unZ_LkcAaVNSeOwvdwtD=A@mail.gmail.com
This commit is contained in:
Tom Lane
2017-09-19 23:32:45 -04:00
parent d3a4f89d8a
commit 2d484f9b05
10 changed files with 22 additions and 105 deletions

View File

@ -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);