diff options
author | Tom Lane | 2018-02-06 18:52:27 +0000 |
---|---|---|
committer | Tom Lane | 2018-02-06 18:52:27 +0000 |
commit | 3785f7eee3d98bc0a7ac2576aac9c0be974217d4 (patch) | |
tree | d979431708b4de1ca9ca23558f3171f88145036e /doc/src/sgml/xindex.sgml | |
parent | f069c91a5793ff6b7884120de748b2005ee7756f (diff) |
Doc: move info for btree opclass implementors into main documentation.
Up to now, useful info for writing a new btree opclass has been buried
in the backend's nbtree/README file. Let's move it into the SGML docs,
in preparation for extending it with info about "in_range" functions
in the upcoming window RANGE patch.
To do this, I chose to create a new chapter for btree indexes in Part VII
(Internals), parallel to the chapters that exist for the newer index AMs.
This is a pretty short chapter as-is. At some point somebody might care
to flesh it out with more detail about btree internals, but that is
beyond the scope of my ambition for today.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'doc/src/sgml/xindex.sgml')
-rw-r--r-- | doc/src/sgml/xindex.sgml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml index 81c0cdc4f8d..e40131473fe 100644 --- a/doc/src/sgml/xindex.sgml +++ b/doc/src/sgml/xindex.sgml @@ -35,7 +35,7 @@ <productname>PostgreSQL</productname>, but all index methods are described in <classname>pg_am</classname>. It is possible to add a new index access method by writing the necessary code and - then creating a row in <classname>pg_am</classname> — but that is + then creating an entry in <classname>pg_am</classname> — but that is beyond the scope of this chapter (see <xref linkend="indexam"/>). </para> @@ -404,6 +404,8 @@ B-trees require a single support function, and allow a second one to be supplied at the operator class author's option, as shown in <xref linkend="xindex-btree-support-table"/>. + The requirements for these support functions are explained further in + <xref linkend="btree-support-funcs"/>. </para> <table tocentry="1" id="xindex-btree-support-table"> @@ -426,8 +428,8 @@ </row> <row> <entry> - Return the addresses of C-callable sort support function(s), - as documented in <filename>utils/sortsupport.h</filename> (optional) + Return the addresses of C-callable sort support function(s) + (optional) </entry> <entry>2</entry> </row> @@ -1056,11 +1058,8 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD <para> In a B-tree operator family, all the operators in the family must sort - compatibly, meaning that the transitive laws hold across all the data types - supported by the family: <quote>if A = B and B = C, then A = C</quote>, - and <quote>if A < B and B < C, then A < C</quote>. Moreover, implicit - or binary coercion casts between types represented in the operator family - must not change the associated sort ordering. For each + compatibly, as is specified in detail in <xref linkend="btree-behavior"/>. + For each operator in the family there must be a support function having the same two input data types as the operator. It is recommended that a family be complete, i.e., for each combination of data types, all operators are |