And a doc patch to go with it: -- Andrew (irc:RhodiumToad)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 0689cc9..3e13e38 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -577,6 +577,89 @@ </tgroup> </table> + <para> + Capability information formerly stored in <structname>pg_am</structname> + is now available via the functions + <function>pg_indexam_has_capability</function> and + <function>pg_index_has_capability</function> + (see <xref linkend="functions-info-catalog-table">). The following + boolean-valued capability names are currently supported: + </para> + + <table> + <title>Capabilities</title> + + <tgroup cols="2"> + <thead> + <row> + <entry>Name</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>amcanorder</literal></entry> + <entry>Does the access method support ordered scans sorted by the + indexed column's value?</entry> + </row> + <row> + <entry><literal>amcanorderbyop</literal></entry> + <entry>Does the access method support ordered scans sorted by the result + of an operator on the indexed column?</entry> + </row> + <row> + <entry><literal>amcanbackward</literal></entry> + <entry>Does the access method support backward scanning?</entry> + </row> + <row> + <entry><literal>amcanunique</literal></entry> + <entry>Does the access method support unique indexes?</entry> + </row> + <row> + <entry><literal>amcanmulticol</literal></entry> + <entry>Does the access method support multicolumn indexes?</entry> + </row> + <row> + <entry><literal>amoptionalkey</literal></entry> + <entry>Does the access method support a scan without any constraint + for the first index column?</entry> + </row> + <row> + <entry><literal>amsearcharray</literal></entry> + <entry>Does the access method support <literal>ScalarArrayOpExpr</> searches?</entry> + </row> + <row> + <entry><literal>amsearchnulls</literal></entry> + <entry>Does the access method support <literal>IS NULL</>/<literal>NOT NULL</> searches?</entry> + </row> + <row> + <entry><literal>amstorage</literal></entry> + <entry>Can index storage data type differ from column data type?</entry> + </row> + <row> + <entry><literal>amclusterable</literal></entry> + <entry>Can an index of this type be clustered on?</entry> + </row> + <row> + <entry><literal>ampredlocks</literal></entry> + <entry>Does an index of this type manage fine-grained predicate locks?</entry> + </row> + <row> + <entry><literal>amgettuple</literal></entry> + <entry>Does the access method provide an <function>amgettuple</function> function?</entry> + </row> + <row> + <entry><literal>amgetbitmap</literal></entry> + <entry>Does the access method provide an <function>amgetbitmap</function> function?</entry> + </row> + <row> + <entry><literal>amcanreturn</literal></entry> + <entry>Does the access method support index-only scans?</entry> + </row> + </tbody> + </tgroup> + </table> + </sect1> diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index baef80d..fd6b983 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -16193,6 +16193,14 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); </indexterm> <indexterm> + <primary>pg_indexam_has_capability</primary> + </indexterm> + + <indexterm> + <primary>pg_index_has_capability</primary> + </indexterm> + + <indexterm> <primary>pg_options_to_table</primary> </indexterm> @@ -16380,6 +16388,16 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); number of columns, pretty-printing is implied</entry> </row> <row> + <entry><literal><function>pg_indexam_has_capability(<parameter>am_oid</parameter>, <parameter>cap_name</>)</function></literal></entry> + <entry><type>boolean</type></entry> + <entry>Test whether an index access method has a specified capability</entry> + </row> + <row> + <entry><literal><function>pg_index_has_capability(<parameter>index_oid</parameter>, <parameter>cap_name</>)</function></literal></entry> + <entry><type>boolean</type></entry> + <entry>Test whether the access method for the specified index has a specified capability</entry> + </row> + <row> <entry><literal><function>pg_options_to_table(<parameter>reloptions</parameter>)</function></literal></entry> <entry><type>setof record</type></entry> <entry>get the set of storage option name/value pairs</entry> @@ -16523,6 +16541,16 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); </para> <para> + <function>pg_indexam_has_capability</function> and + <function>pg_index_has_capability</function> return whether the specified + access method, or the access method for the specified index, advertises the + named capability. <literal>NULL</literal> is returned if the capability + name is not known; <literal>true</literal> if the capability is advertised, + <literal>false</literal> if it is not. Refer + to <xref linkend="catalog-pg-am"> for capability names and their meanings. + </para> + + <para> <function>pg_options_to_table</function> returns the set of storage option name/value pairs (<literal>option_name</>/<literal>option_value</>) when passed
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers