postgresql/src/include/utils
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
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
aclchk_internal.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
array.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
arrayaccess.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
ascii.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
attoptcache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
builtins.h Optimizations for integer to decimal output. 2020-02-01 21:57:14 +00:00
bytea.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
cash.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catcache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
combocid.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
date.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
datetime.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
datum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
dsa.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
dynahash.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
elog.h Go back to returning int from ereport auxiliary functions. 2020-03-25 11:57:36 -04:00
evtcache.h Fix up recent breakage of headerscheck and cpluspluscheck. 2020-03-21 18:28:44 -04:00
expandeddatum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
expandedrecord.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
float.h Avoid a performance regression in float overflow/underflow detection. 2020-02-13 13:37:43 -05:00
fmgrtab.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
formatting.h Allow to_date/to_timestamp to recognize non-English month/day names. 2020-03-03 11:06:47 -05:00
freepage.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
geo_decls.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
guc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
guc_tables.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
help_config.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
hsearch.h Put all the prototypes for hashfn.c into the same header file. 2020-02-24 17:22:45 +05:30
index_selfuncs.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
inet.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
int8.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
inval.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
json.h Adjust src/include/utils/jsonapi.h so it's not backend-only. 2020-01-24 09:58:37 -08:00
jsonb.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jsonfuncs.h Move jsonapi.c and jsonapi.h to src/common. 2020-01-29 10:22:51 -05:00
jsonpath.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
logtape.h Introduce LogicalTapeSetExtend(). 2020-03-09 10:40:02 -07:00
lsyscache.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
memdebug.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
memutils.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
numeric.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
palloc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
partcache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_crc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_locale.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_lsn.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_rusage.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pidfile.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
plancache.h Rearrange validity checks for plpgsql "simple" expressions. 2020-03-27 14:47:34 -04:00
portal.h Represent command completion tags as structs 2020-03-02 18:19:51 -03:00
ps_status.h Refactor ps_status.c API 2020-03-11 16:38:31 +01:00
queryenvironment.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rangetypes.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
regproc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rel.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
relcache.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
relfilenodemap.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relmapper.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relptr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
reltrigger.h Enable BEFORE row-level triggers for partitioned tables 2020-03-18 18:58:05 -03:00
resowner.h Improve performance of "simple expressions" in PL/pgSQL. 2020-03-26 18:58:57 -04:00
resowner_private.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rls.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
ruleutils.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
sampling.h Report progress of ANALYZE commands 2020-01-15 11:14:39 -03:00
selfuncs.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sharedtuplestore.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
snapmgr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
snapshot.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sortsupport.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
spccache.h Introduce a maintenance_io_concurrency setting. 2020-03-16 17:14:26 +13:00
syscache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
timeout.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
timestamp.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tuplesort.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tuplestore.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
typcache.h Allow ALTER TYPE to change some properties of a base type. 2020-03-06 12:19:29 -05:00
tzparser.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
uuid.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
varbit.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
varlena.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xml.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00