Add stratnum GiST support function
authorPeter Eisentraut <[email protected]>
Tue, 17 Sep 2024 08:19:26 +0000 (10:19 +0200)
committerPeter Eisentraut <[email protected]>
Tue, 17 Sep 2024 09:29:29 +0000 (11:29 +0200)
commit7406ab623fee1addcb21c881afecbe638a0d56e9
tree6c75a0f795ecec184e0cb9dcd05ed74bd324a6c6
parent95d6e9af07d2e5af2fdd272e72b5b552bad3ea0a
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.

(previously committed as 6db4598fcb8, reverted by 8aee330af55; this is
essentially unchanged from those)

Author: Paul A. Jungwirth <[email protected]>
Reviewed-by: Peter Eisentraut <[email protected]>
Reviewed-by: jian he <[email protected]>
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