diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2020-06-20 13:34:54 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2020-06-20 13:34:54 +0300 |
commit | 15cb2bd27009f73a84a35c2ba60fdd105b4bf263 (patch) | |
tree | 366bd6095f871106f3c0476420721303663296f9 /doc/src/sgml/spgist.sgml | |
parent | d28ab91e7155353d4377abad5a7d5b0f07450867 (diff) | |
download | postgresql-15cb2bd27009f73a84a35c2ba60fdd105b4bf263.tar.gz postgresql-15cb2bd27009f73a84a35c2ba60fdd105b4bf263.zip |
Add documentation for opclass options
911e7020770 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
Diffstat (limited to 'doc/src/sgml/spgist.sgml')
-rw-r--r-- | doc/src/sgml/spgist.sgml | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/doc/src/sgml/spgist.sgml b/doc/src/sgml/spgist.sgml index 0e04a086793..03f914735bd 100644 --- a/doc/src/sgml/spgist.sgml +++ b/doc/src/sgml/spgist.sgml @@ -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> |