1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

doc: Fix DocBook XML validity

The main problem is that DocBook SGML allows indexterm elements just
about everywhere, but DocBook XML is stricter.  For example, this common
pattern

    <varlistentry>
     <indexterm>...</indexterm>
     <term>...</term>
     ...
    </varlistentry>

needs to be changed to something like

    <varlistentry>
     <term>...<indexterm>...</indexterm></term>
     ...
    </varlistentry>

See also bb4eefe7bf.

There is currently nothing in the build system that enforces that things
stay valid, because that requires additional tools and will receive
separate consideration.
This commit is contained in:
Peter Eisentraut
2014-05-06 21:28:58 -04:00
parent 84288a86ac
commit 3a9d430af5
24 changed files with 903 additions and 578 deletions

View File

@@ -380,40 +380,13 @@ use strict;
<variablelist>
<varlistentry>
<indexterm>
<primary>spi_exec_query</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<indexterm>
<primary>spi_query</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<indexterm>
<primary>spi_fetchrow</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<indexterm>
<primary>spi_prepare</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<indexterm>
<primary>spi_exec_prepared</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<indexterm>
<primary>spi_query_prepared</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<indexterm>
<primary>spi_cursor_close</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<indexterm>
<primary>spi_freeplan</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>spi_exec_query</>(<replaceable>query</replaceable> [, <replaceable>max-rows</replaceable>])</literal></term>
<term>
<literal><function>spi_exec_query</>(<replaceable>query</replaceable> [, <replaceable>max-rows</replaceable>])</literal>
<indexterm>
<primary>spi_exec_query</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
<literal>spi_exec_query</literal> executes an SQL command and
@@ -490,9 +463,27 @@ SELECT * FROM test_munge();
</varlistentry>
<varlistentry>
<term><literal><function>spi_query(<replaceable>command</replaceable>)</function></literal></term>
<term><literal><function>spi_fetchrow(<replaceable>cursor</replaceable>)</function></literal></term>
<term><literal><function>spi_cursor_close(<replaceable>cursor</replaceable>)</function></literal></term>
<term>
<literal><function>spi_query(<replaceable>command</replaceable>)</function></literal>
<indexterm>
<primary>spi_query</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<term>
<literal><function>spi_fetchrow(<replaceable>cursor</replaceable>)</function></literal>
<indexterm>
<primary>spi_fetchrow</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<term>
<literal><function>spi_cursor_close(<replaceable>cursor</replaceable>)</function></literal>
<indexterm>
<primary>spi_cursor_close</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
@@ -548,10 +539,34 @@ SELECT * from lotsa_md5(500);
</varlistentry>
<varlistentry>
<term><literal><function>spi_prepare(<replaceable>command</replaceable>, <replaceable>argument types</replaceable>)</function></literal></term>
<term><literal><function>spi_query_prepared(<replaceable>plan</replaceable>, <replaceable>arguments</replaceable>)</function></literal></term>
<term><literal><function>spi_exec_prepared(<replaceable>plan</replaceable> [, <replaceable>attributes</replaceable>], <replaceable>arguments</replaceable>)</function></literal></term>
<term><literal><function>spi_freeplan(<replaceable>plan</replaceable>)</function></literal></term>
<term>
<literal><function>spi_prepare(<replaceable>command</replaceable>, <replaceable>argument types</replaceable>)</function></literal>
<indexterm>
<primary>spi_prepare</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<term>
<literal><function>spi_query_prepared(<replaceable>plan</replaceable>, <replaceable>arguments</replaceable>)</function></literal>
<indexterm>
<primary>spi_query_prepared</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<term>
<literal><function>spi_exec_prepared(<replaceable>plan</replaceable> [, <replaceable>attributes</replaceable>], <replaceable>arguments</replaceable>)</function></literal>
<indexterm>
<primary>spi_exec_prepared</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<term>
<literal><function>spi_freeplan(<replaceable>plan</replaceable>)</function></literal>
<indexterm>
<primary>spi_freeplan</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
@@ -651,12 +666,13 @@ SELECT release_hosts_query();
<variablelist>
<varlistentry>
<indexterm>
<primary>elog</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>elog(<replaceable>level</replaceable>, <replaceable>msg</replaceable>)</function></literal></term>
<term>
<literal><function>elog(<replaceable>level</replaceable>, <replaceable>msg</replaceable>)</function></literal>
<indexterm>
<primary>elog</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Emit a log or error message. Possible levels are
@@ -680,12 +696,13 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>quote_literal</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>quote_literal(<replaceable>string</replaceable>)</function></literal></term>
<term>
<literal><function>quote_literal(<replaceable>string</replaceable>)</function></literal>
<indexterm>
<primary>quote_literal</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Return the given string suitably quoted to be used as a string literal in an SQL
@@ -697,12 +714,13 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>quote_nullable</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>quote_nullable(<replaceable>string</replaceable>)</function></literal></term>
<term>
<literal><function>quote_nullable(<replaceable>string</replaceable>)</function></literal>
<indexterm>
<primary>quote_nullable</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Return the given string suitably quoted to be used as a string literal in an SQL
@@ -713,12 +731,13 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>quote_ident</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>quote_ident(<replaceable>string</replaceable>)</function></literal></term>
<term>
<literal><function>quote_ident(<replaceable>string</replaceable>)</function></literal>
<indexterm>
<primary>quote_ident</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Return the given string suitably quoted to be used as an identifier in
@@ -730,12 +749,13 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>decode_bytea</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>decode_bytea(<replaceable>string</replaceable>)</function></literal></term>
<term>
<literal><function>decode_bytea(<replaceable>string</replaceable>)</function></literal>
<indexterm>
<primary>decode_bytea</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Return the unescaped binary data represented by the contents of the given string,
@@ -745,12 +765,13 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>encode_bytea</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>encode_bytea(<replaceable>string</replaceable>)</function></literal></term>
<term>
<literal><function>encode_bytea(<replaceable>string</replaceable>)</function></literal>
<indexterm>
<primary>encode_bytea</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Return the <type>bytea</type> encoded form of the binary data contents of the given string.
@@ -759,13 +780,16 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>encode_array_literal</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>encode_array_literal(<replaceable>array</replaceable>)</function></literal></term>
<term><literal><function>encode_array_literal(<replaceable>array</replaceable>, <replaceable>delimiter</replaceable>)</function></literal></term>
<term>
<literal><function>encode_array_literal(<replaceable>array</replaceable>)</function></literal>
<indexterm>
<primary>encode_array_literal</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<term>
<literal><function>encode_array_literal(<replaceable>array</replaceable>, <replaceable>delimiter</replaceable>)</function></literal>
</term>
<listitem>
<para>
Returns the contents of the referenced array as a string in array literal format
@@ -778,12 +802,13 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>encode_typed_literal</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>encode_typed_literal(<replaceable>value</replaceable>, <replaceable>typename</replaceable>)</function></literal></term>
<term>
<literal><function>encode_typed_literal(<replaceable>value</replaceable>, <replaceable>typename</replaceable>)</function></literal>
<indexterm>
<primary>encode_typed_literal</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Converts a Perl variable to the value of the data type passed as a
@@ -794,12 +819,13 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>encode_array_constructor</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>encode_array_constructor(<replaceable>array</replaceable>)</function></literal></term>
<term>
<literal><function>encode_array_constructor(<replaceable>array</replaceable>)</function></literal>
<indexterm>
<primary>encode_array_constructor</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Returns the contents of the referenced array as a string in array constructor format
@@ -812,12 +838,13 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>looks_like_number</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>looks_like_number(<replaceable>string</replaceable>)</function></literal></term>
<term>
<literal><function>looks_like_number(<replaceable>string</replaceable>)</function></literal>
<indexterm>
<primary>looks_like_number</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Returns a true value if the content of the given string looks like a
@@ -829,12 +856,13 @@ SELECT release_hosts_query();
</varlistentry>
<varlistentry>
<indexterm>
<primary>is_array_ref</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
<term><literal><function>is_array_ref(<replaceable>argument</replaceable>)</function></literal></term>
<term>
<literal><function>is_array_ref(<replaceable>argument</replaceable>)</function></literal>
<indexterm>
<primary>is_array_ref</primary>
<secondary>in PL/Perl</secondary>
</indexterm>
</term>
<listitem>
<para>
Returns a true value if the given argument may be treated as an
@@ -1274,10 +1302,12 @@ CREATE EVENT TRIGGER perl_a_snitch
<variablelist>
<varlistentry id="guc-plperl-on-init" xreflabel="plperl.on_init">
<term><varname>plperl.on_init</varname> (<type>string</type>)</term>
<term>
<varname>plperl.on_init</varname> (<type>string</type>)
<indexterm>
<primary><varname>plperl.on_init</> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Specifies Perl code to be executed when a Perl interpreter is first
@@ -1329,14 +1359,18 @@ DO 'elog(WARNING, join ", ", sort keys %INC)' LANGUAGE plperl;
</varlistentry>
<varlistentry id="guc-plperl-on-plperl-init" xreflabel="plperl.on_plperl_init">
<term><varname>plperl.on_plperl_init</varname> (<type>string</type>)</term>
<term><varname>plperl.on_plperlu_init</varname> (<type>string</type>)</term>
<indexterm>
<primary><varname>plperl.on_plperl_init</> configuration parameter</primary>
</indexterm>
<indexterm>
<primary><varname>plperl.on_plperlu_init</> configuration parameter</primary>
</indexterm>
<term>
<varname>plperl.on_plperl_init</varname> (<type>string</type>)
<indexterm>
<primary><varname>plperl.on_plperl_init</> configuration parameter</primary>
</indexterm>
</term>
<term>
<varname>plperl.on_plperlu_init</varname> (<type>string</type>)
<indexterm>
<primary><varname>plperl.on_plperlu_init</> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
These parameters specify Perl code to be executed when a Perl
@@ -1368,10 +1402,12 @@ DO 'elog(WARNING, join ", ", sort keys %INC)' LANGUAGE plperl;
</varlistentry>
<varlistentry id="guc-plperl-use-strict" xreflabel="plperl.use_strict">
<term><varname>plperl.use_strict</varname> (<type>boolean</type>)</term>
<indexterm>
<primary><varname>plperl.use_strict</> configuration parameter</primary>
</indexterm>
<term>
<varname>plperl.use_strict</varname> (<type>boolean</type>)
<indexterm>
<primary><varname>plperl.use_strict</> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
When set true subsequent compilations of PL/Perl functions will have