Add stratnum GiST support function
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 19 Jan 2024 14:41:44 +0000 (15:41 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 19 Jan 2024 14:42:13 +0000 (15:42 +0100)
commit6db4598fcb82a87a683c4572707e522504830a2b
tree0a1b90ad4c3919e95cc72ba9a6754c6e39a8ef9d
parentb725b7eec431f7394d63abe621170efe3fcdcda4
Add stratnum GiST support function

This is support function 12 for the GiST AM and translates
"well-known" RT*StrategyNumber values into whatever strategy number is
used by the opclass (since no particular numbers are actually
required).  We will use this to support temporal PRIMARY
KEY/UNIQUE/FOREIGN KEY/FOR PORTION OF functionality.

This commit adds two implementations, one for internal GiST opclasses
(just an identity function) and another for btree_gist opclasses.  It
updates btree_gist from 1.7 to 1.8, adding the support function for
all its opclasses.

Author: Paul A. Jungwirth <pj@illuminatedcomputing.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: jian he <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mDHcY4_qQ0+noCUVg@mail.gmail.com
17 files changed:
contrib/btree_gist/Makefile
contrib/btree_gist/btree_gist--1.7--1.8.sql [new file with mode: 0644]
contrib/btree_gist/btree_gist.c
contrib/btree_gist/btree_gist.control
contrib/btree_gist/expected/stratnum.out [new file with mode: 0644]
contrib/btree_gist/meson.build
contrib/btree_gist/sql/stratnum.sql [new file with mode: 0644]
doc/src/sgml/gist.sgml
doc/src/sgml/xindex.sgml
src/backend/access/gist/gistutil.c
src/backend/access/gist/gistvalidate.c
src/include/access/gist.h
src/include/catalog/catversion.h
src/include/catalog/pg_amproc.dat
src/include/catalog/pg_proc.dat
src/test/regress/expected/misc_functions.out
src/test/regress/sql/misc_functions.sql