diff options
author | Peter Eisentraut | 2024-01-24 14:43:41 +0000 |
---|---|---|
committer | Peter Eisentraut | 2024-01-24 15:34:37 +0000 |
commit | 46a0cd4cefb4d9b462d8cc4df5e7ecdd190bea92 (patch) | |
tree | ccbcef511474ad69dd7472f0a35fe7813e47d909 /doc/src/sgml/gist.sgml | |
parent | 74a73063106583b1f49274a2cd1df42e35107361 (diff) |
Add temporal PRIMARY KEY and UNIQUE constraints
Add WITHOUT OVERLAPS clause to PRIMARY KEY and UNIQUE constraints.
These are backed by GiST indexes instead of B-tree indexes, since they
are essentially exclusion constraints with = for the scalar parts of
the key and && for the temporal part.
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
Diffstat (limited to 'doc/src/sgml/gist.sgml')
-rw-r--r-- | doc/src/sgml/gist.sgml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml index 7c20f8467b4..8a19f156d83 100644 --- a/doc/src/sgml/gist.sgml +++ b/doc/src/sgml/gist.sgml @@ -298,7 +298,8 @@ CREATE INDEX ON my_table USING GIST (my_inet_column inet_ops); The optional twelfth method <function>stratnum</function> is used to translate well-known <literal>RT*StrategyNumber</literal>s (from <filename>src/include/access/stratnum.h</filename>) into strategy numbers - used by the operator class. + used by the operator class. This lets the core code look up operators for + temporal constraint indexes. </para> <variablelist> @@ -1186,6 +1187,17 @@ my_sortsupport(PG_FUNCTION_ARGS) </para> <para> + This is used for temporal index constraints (i.e., <literal>PRIMARY + KEY</literal> and <literal>UNIQUE</literal>). If the operator class + provides this function and it returns results for + <literal>RTEqualStrategyNumber</literal>, it can be used in the + non-<literal>WITHOUT OVERLAPS</literal> part(s) of an index constraint. + If it returns results for <literal>RTOverlapStrategyNumber</literal>, + the operator class can be used in the <literal>WITHOUT + OVERLAPS</literal> part of an index constraint. + </para> + + <para> The <acronym>SQL</acronym> declaration of the function must look like this: |