1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Add documentation for opclass options

911e702077 added opclass options and adjusted documentation for each
particular affected opclass.  However, documentation for extendability was
not adjusted.  This commit adjusts documentation for interfaces of index AMs
and opclasses.

Discussion: https://postgr.es/m/CAH2-WzmQnW6%2Bz5F9AW%2BSz%2BzEcEvXofTwh_A9J3%3D_WA-FBP0wYg%40mail.gmail.com
Author: Alexander Korotkov
Reported-by: Peter Geoghegan
Reviewed-by: Peter Geoghegan
This commit is contained in:
Alexander Korotkov
2020-06-20 13:34:54 +03:00
parent d28ab91e71
commit 15cb2bd270
7 changed files with 336 additions and 4 deletions

View File

@ -858,7 +858,7 @@ typedef struct spgLeafConsistentOut
</variablelist>
<para>
The optional user-defined method is:
The optional user-defined method are:
</para>
<variablelist>
@ -875,6 +875,39 @@ typedef struct spgLeafConsistentOut
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><function>options</function></term>
<listitem>
<para>
Defines set of user-visible parameters that control operator class
behavior.
</para>
<para>
The <acronym>SQL</acronym> declaration of the function must look like this:
<programlisting>
CREATE OR REPLACE FUNCTION my_options(internal)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
</programlisting>
</para>
<para>
The function has given pointer to <replaceable>local_relopts</replaceable>
struct, which needs to be filled with a set of operator class
specific options. The options can be accessed from other support
functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
<literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
</para>
<para>
Since the representation of the key in <acronym>SP-GiST</acronym> is
flexible, it may depends on user-specified parameters.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>