diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2017-12-22 13:33:16 +0300 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2017-12-22 13:33:16 +0300 |
commit | 854823fa334cb826eed50da751801d0693b10173 (patch) | |
tree | 437b74de241ede698bc1f9734f40829ee648b93e /src/include/access/spgist.h | |
parent | 9373baa0f764392c504df034afd2f6b178c29491 (diff) | |
download | postgresql-854823fa334cb826eed50da751801d0693b10173.tar.gz postgresql-854823fa334cb826eed50da751801d0693b10173.zip |
Add optional compression method to SP-GiST
Patch allows to have different types of column and value stored in leaf tuples
of SP-GiST. The main application of feature is to transform complex column type
to simple indexed type or for truncating too long value, transformation could
be lossy. Simple example: polygons are converted to their bounding boxes,
this opclass follows.
Authors: me, Heikki Linnakangas, Alexander Korotkov, Nikita Glukhov
Reviewed-By: all authors + Darafei Praliaskouski
Discussions:
https://www.postgresql.org/message-id/5447B3FF.2080406@sigaev.ru
https://www.postgresql.org/message-id/flat/54907069.1030506@sigaev.ru#54907069.1030506@sigaev.ru
Diffstat (limited to 'src/include/access/spgist.h')
-rw-r--r-- | src/include/access/spgist.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/access/spgist.h b/src/include/access/spgist.h index d1bc396e6df..06b1d88e5a7 100644 --- a/src/include/access/spgist.h +++ b/src/include/access/spgist.h @@ -30,7 +30,9 @@ #define SPGIST_PICKSPLIT_PROC 3 #define SPGIST_INNER_CONSISTENT_PROC 4 #define SPGIST_LEAF_CONSISTENT_PROC 5 -#define SPGISTNProc 5 +#define SPGIST_COMPRESS_PROC 6 +#define SPGISTNRequiredProc 5 +#define SPGISTNProc 6 /* * Argument structs for spg_config method @@ -44,6 +46,7 @@ typedef struct spgConfigOut { Oid prefixType; /* Data type of inner-tuple prefixes */ Oid labelType; /* Data type of inner-tuple node labels */ + Oid leafType; /* Data type of leaf-tuple values */ bool canReturnData; /* Opclass can reconstruct original data */ bool longValuesOK; /* Opclass can cope with values > 1 page */ } spgConfigOut; |