postgresql/contrib/intarray
Alexander Korotkov 911e702077 Implement operator class parameters
PostgreSQL provides set of template index access methods, where opclasses have
much freedom in the semantics of indexing.  These index AMs are GiST, GIN,
SP-GiST and BRIN.  There opclasses define representation of keys, operations on
them and supported search strategies.  So, it's natural that opclasses may be
faced some tradeoffs, which require user-side decision.  This commit implements
opclass parameters allowing users to set some values, which tell opclass how to
index the particular dataset.

This commit doesn't introduce new storage in system catalog.  Instead it uses
pg_attribute.attoptions, which is used for table column storage options but
unused for index attributes.

In order to evade changing signature of each opclass support function, we
implement unified way to pass options to opclass support functions.  Options
are set to fn_expr as the constant bytea expression.  It's possible due to the
fact that opclass support functions are executed outside of expressions, so
fn_expr is unused for them.

This commit comes with some examples of opclass options usage.  We parametrize
signature length in GiST.  That applies to multiple opclasses: tsvector_ops,
gist__intbig_ops, gist_ltree_ops, gist__ltree_ops, gist_trgm_ops and
gist_hstore_ops.  Also we parametrize maximum number of integer ranges for
gist__int_ops.  However, the main future usage of this feature is expected
to be json, where users would be able to specify which way to index particular
json parts.

Catversion is bumped.

Discussion: https://postgr.es/m/d22c3a18-31c7-1879-fc11-4c1ce2f5e5af%40postgrespro.ru
Author: Nikita Glukhov, revised by me
Reviwed-by: Nikolay Shaplov, Robert Haas, Tom Lane, Tomas Vondra, Alvaro Herrera
2020-03-30 19:17:23 +03:00
..
bench Don't fall off the end of perl functions 2018-05-27 09:08:42 -04:00
data
expected Implement operator class parameters 2020-03-30 19:17:23 +03:00
sql Implement operator class parameters 2020-03-30 19:17:23 +03:00
_int_bool.c Implement operator class parameters 2020-03-30 19:17:23 +03:00
_int_gin.c Make the order of the header file includes consistent in contrib modules. 2019-10-24 08:05:34 +05:30
_int_gist.c Implement operator class parameters 2020-03-30 19:17:23 +03:00
_int_op.c Clean up newlines following left parentheses 2020-01-30 13:42:14 -03:00
_int_selfuncs.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
_int_tool.c Implement operator class parameters 2020-03-30 19:17:23 +03:00
_int.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
_intbig_gist.c Implement operator class parameters 2020-03-30 19:17:23 +03:00
.gitignore
intarray--1.0--1.1.sql
intarray--1.1--1.2.sql
intarray--1.2--1.3.sql Implement operator class parameters 2020-03-30 19:17:23 +03:00
intarray--1.2.sql
intarray.control Implement operator class parameters 2020-03-30 19:17:23 +03:00
Makefile Implement operator class parameters 2020-03-30 19:17:23 +03:00