Doc: fix "Unresolved ID reference" warnings, clean up man page cross-refs.
authorTom Lane <[email protected]>
Mon, 11 May 2020 18:15:49 +0000 (14:15 -0400)
committerTom Lane <[email protected]>
Mon, 11 May 2020 18:15:55 +0000 (14:15 -0400)
Use xreflabel attributes instead of endterm attributes to control the
appearance of links to subsections of SQL command reference pages.
This is simpler, it matches what we do elsewhere (e.g. for GUC variables),
and it doesn't draw "Unresolved ID reference" warnings from the PDF
toolchain.

Fix some places where the text was absolutely dependent on an <xref>
rendering exactly so, by using a <link> around the required text
instead.  At least one of those spots had already been turned into
bad grammar by subsequent changes, and the whole idea is just too
fragile for my taste.  <xref> does NOT have fixed output, don't write
as if it does.

Consistently include a page-level link in cross-man-page references,
because otherwise they are useless/nonsensical in man-page output.
Likewise, be consistent about mentioning "below" or "above" in same-page
references; we were doing that in about 90% of the cases, but now it's
100%.

Also get rid of another nonfunctional-in-PDF idea, of making
cross-references to functions by sticking ID tags on <row> constructs.
We can put the IDs on <indexterm>s instead --- which is probably not any
more sensible in abstract terms, but it works where the other doesn't.
(There is talk of attaching cross-reference IDs to most or all of
the docs' function descriptions, but for now I just fixed the two
that exist.)

Discussion: https://postgr.es/m/14480.1589154358@sss.pgh.pa.us

26 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/func.sgml
doc/src/sgml/indices.sgml
doc/src/sgml/maintenance.sgml
doc/src/sgml/queries.sgml
doc/src/sgml/ref/alter_collation.sgml
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/create_aggregate.sgml
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/ref/create_materialized_view.sgml
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_table_as.sgml
doc/src/sgml/ref/declare.sgml
doc/src/sgml/ref/delete.sgml
doc/src/sgml/ref/execute.sgml
doc/src/sgml/ref/insert.sgml
doc/src/sgml/ref/lock.sgml
doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pg_dumpall.sgml
doc/src/sgml/ref/postgres-ref.sgml
doc/src/sgml/ref/prepare.sgml
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/reindex.sgml
doc/src/sgml/ref/select.sgml
doc/src/sgml/ref/update.sgml
doc/src/sgml/ref/values.sgml

index 3aea1763b48ad4fe6b5067ca550708a8675daf7f..9f2a4a2470e3a9316209f3ade7984f60b21c31a0 100644 (file)
@@ -7301,8 +7301,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
       These settings control the behavior of the <firstterm>autovacuum</firstterm>
       feature.  Refer to <xref linkend="autovacuum"/> for more information.
       Note that many of these settings can be overridden on a per-table
-      basis; see <xref linkend="sql-createtable-storage-parameters"
-      endterm="sql-createtable-storage-parameters-title"/>.
+      basis; see <xref linkend="sql-createtable-storage-parameters"/>.
      </para>
 
     <variablelist>
index d9b3598977f4dff4fb8204067ab6adffca5e49f0..7c06afd3eafcb68d67faad526c17b17674d7ed78 100644 (file)
@@ -4355,9 +4355,9 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
       </para></entry>
      </row>
 
-     <row id="function-encode">
+     <row>
       <entry role="func_table_entry"><para role="func_signature">
-       <indexterm>
+       <indexterm id="function-encode">
         <primary>encode</primary>
        </indexterm>
        <function>encode</function> ( <parameter>bytes</parameter> <type>bytea</type>,
@@ -4377,9 +4377,9 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
       </para></entry>
      </row>
 
-     <row id="function-decode">
+     <row>
       <entry role="func_table_entry"><para role="func_signature">
-       <indexterm>
+       <indexterm id="function-decode">
         <primary>decode</primary>
        </indexterm>
        <function>decode</function> ( <parameter>string</parameter> <type>text</type>,
index 1be209a2fe72ef963cc08b7be277f7d6c8e97bb2..98d7a238de7bb6da4e1835bd2f5e49a1312b910f 100644 (file)
@@ -98,8 +98,7 @@ CREATE INDEX test1_id_index ON test1 (id);
    In production environments this is often unacceptable.
    It is possible to allow writes to occur in parallel with index
    creation, but there are several caveats to be aware of &mdash;
-   for more information see <xref linkend="sql-createindex-concurrently"
-   endterm="sql-createindex-concurrently-title"/>.
+   for more information see <xref linkend="sql-createindex-concurrently"/>.
   </para>
 
   <para>
index a0e0f34c25f9026d9c07b67976671baaba152b69..39075ea8f33d9d8230707291cdf7510ddb76f47e 100644 (file)
@@ -827,8 +827,7 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
     The default thresholds and scale factors are taken from
     <filename>postgresql.conf</filename>, but it is possible to override them
     (and many other autovacuum control parameters) on a per-table basis; see
-    <xref linkend="sql-createtable-storage-parameters"
-    endterm="sql-createtable-storage-parameters-title"/> for more information.
+    <xref linkend="sql-createtable-storage-parameters"/> for more information.
     If a setting has been changed via a table's storage parameters, that value
     is used when processing that table; otherwise the global settings are
     used. See <xref linkend="runtime-config-autovacuum"/> for more details on
index 22252556be22178da83d081a273395ef26c9df05..572e9682733a7d188bb7aa9dedb49dc782ed0190 100644 (file)
@@ -110,7 +110,7 @@ SELECT random();
    <title>The <literal>FROM</literal> Clause</title>
 
    <para>
-    The <xref linkend="sql-from" endterm="sql-from-title"/> derives a
+    The <link linkend="sql-from"><literal>FROM</literal></link> clause derives a
     table from one or more other tables given in a comma-separated
     table reference list.
 <synopsis>
@@ -907,8 +907,8 @@ WHERE pname IS NULL;
    </indexterm>
 
    <para>
-    The syntax of the <xref linkend="sql-where"
-    endterm="sql-where-title"/> is
+    The syntax of the <link linkend="sql-where"><literal>WHERE</literal></link>
+    clause is
 <synopsis>
 WHERE <replaceable>search_condition</replaceable>
 </synopsis>
@@ -1014,7 +1014,7 @@ SELECT <replaceable>select_list</replaceable>
 </synopsis>
 
    <para>
-    The <xref linkend="sql-groupby" endterm="sql-groupby-title"/> is
+    The <link linkend="sql-groupby"><literal>GROUP BY</literal></link> clause is
     used to group together those rows in a table that have the same
     values in all the columns listed. The order in which the columns
     are listed does not matter.  The effect is to combine each set
index 4cfcb42251f00d5fd97d7d4bcf1bbe76aaecdd7e..56f94627c673eee8ac5a127cc74389b85c0999c9 100644 (file)
@@ -93,16 +93,15 @@ ALTER COLLATION <replaceable>name</replaceable> SET SCHEMA <replaceable>new_sche
     <listitem>
      <para>
       Update the collation's version.
-      See <xref linkend="sql-altercollation-notes"
-      endterm="sql-altercollation-notes-title"/> below.
+      See <xref linkend="sql-altercollation-notes"/> below.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </refsect1>
 
- <refsect1 id="sql-altercollation-notes">
-  <title id="sql-altercollation-notes-title">Notes</title>
+ <refsect1 id="sql-altercollation-notes" xreflabel="Notes">
+  <title>Notes</title>
 
   <para>
    When using collations provided by the ICU library, the ICU-specific version
index 6563bd5ab213025162affd385324f59e809c4b33..cbfb4828e5060776fce9ca212880fe2ee13b6e9e 100644 (file)
@@ -405,8 +405,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       database will not assume that the constraint holds for all rows in
       the table, until it is validated by using the <literal>VALIDATE
       CONSTRAINT</literal> option.
-      See <xref linkend="sql-altertable-notes"
-      endterm="sql-altertable-notes-title"/> below for more information
+      See <xref linkend="sql-altertable-notes"/> below for more information
       about using the <literal>NOT VALID</literal> option.
      </para>
 
@@ -504,9 +503,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       previously created as <literal>NOT VALID</literal>, by scanning the
       table to ensure there are no rows for which the constraint is not
       satisfied.  Nothing happens if the constraint is already marked valid.
-      (See <xref linkend="sql-altertable-notes"
-      endterm="sql-altertable-notes-title"/> below for an explanation of the
-      usefulness of this command.)
+      (See <xref linkend="sql-altertable-notes"/> below for an explanation
+      of the usefulness of this command.)
      </para>
     </listitem>
    </varlistentry>
@@ -708,8 +706,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
     <listitem>
      <para>
       This form changes one or more storage parameters for the table.  See
-      <xref linkend="sql-createtable-storage-parameters"
-      endterm="sql-createtable-storage-parameters-title"/>
+      <xref linkend="sql-createtable-storage-parameters"/> in the
+      <xref linkend="sql-createtable"/> documentation
       for details on the available parameters.  Note that the table contents
       will not be modified immediately by this command; depending on the
       parameter you might need to rewrite the table to get the desired effects.
@@ -1210,8 +1208,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
     </variablelist>
  </refsect1>
 
- <refsect1 id="sql-altertable-notes">
-  <title id="sql-altertable-notes-title">Notes</title>
+ <refsect1 id="sql-altertable-notes" xreflabel="Notes">
+  <title>Notes</title>
 
    <para>
     The key word <literal>COLUMN</literal> is noise and can be omitted.
index 644657dd5efd54b9562a3e86acfcd9169b3cae8a..811e288ec1efb91609aa0de6f5f9969568d017fa 100644 (file)
@@ -434,8 +434,8 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1;
       This option specifies whether the final function is a pure function
       that does not modify its arguments.  <literal>READ_ONLY</literal> indicates
       it does not; the other two values indicate that it may change the
-      transition state value.  See <xref linkend="sql-createaggregate-notes"
-      endterm="sql-createaggregate-notes-title"/> below for more detail.  The
+      transition state value.  See <xref linkend="sql-createaggregate-notes"/>
+      below for more detail.  The
       default is <literal>READ_ONLY</literal>, except for ordered-set aggregates,
       for which the default is <literal>READ_WRITE</literal>.
      </para>
@@ -664,8 +664,8 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1;
   </para>
  </refsect1>
 
- <refsect1 id="sql-createaggregate-notes">
-  <title id="sql-createaggregate-notes-title">Notes</title>
+ <refsect1 id="sql-createaggregate-notes" xreflabel="Notes">
+  <title>Notes</title>
 
    <para>
     In parameters that specify support function names, you can write
index aaf087e2e3279e76317bd211ee29d98e494b526b..ff87b2d28fca4e6f26e0bcf14d2f315ac6afffa3 100644 (file)
@@ -126,8 +126,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
         updates, or deletes on the table; whereas a standard index build
         locks out writes (but not reads) on the table until it's done.
         There are several caveats to be aware of when using this option
-        &mdash; see <xref linkend="sql-createindex-concurrently"
-        endterm="sql-createindex-concurrently-title"/>.
+        &mdash; see <xref linkend="sql-createindex-concurrently"/> below.
        </para>
        <para>
         For temporary tables, <command>CREATE INDEX</command> is always
@@ -337,7 +336,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
       <listitem>
        <para>
         The name of an index-method-specific storage parameter.  See
-        <xref linkend="sql-createindex-storage-parameters" endterm="sql-createindex-storage-parameters-title"/>
+        <xref linkend="sql-createindex-storage-parameters"/> below
         for details.
        </para>
       </listitem>
@@ -366,8 +365,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
 
     </variablelist>
 
-  <refsect2 id="sql-createindex-storage-parameters">
-   <title id="sql-createindex-storage-parameters-title">Index Storage Parameters</title>
+  <refsect2 id="sql-createindex-storage-parameters" xreflabel="Index Storage Parameters">
+   <title>Index Storage Parameters</title>
 
    <para>
     The optional <literal>WITH</literal> clause specifies <firstterm>storage
@@ -559,8 +558,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] <replaceable class=
    </variablelist>
   </refsect2>
 
-  <refsect2 id="sql-createindex-concurrently">
-   <title id="sql-createindex-concurrently-title">Building Indexes Concurrently</title>
+  <refsect2 id="sql-createindex-concurrently" xreflabel="Building Indexes Concurrently">
+   <title>Building Indexes Concurrently</title>
 
    <indexterm zone="sql-createindex-concurrently">
    <primary>index</primary>
@@ -688,7 +687,7 @@ Indexes:
   </para>
 
   <para>
-   An <firstterm>operator class</firstterm> with its optional parameters 
+   An <firstterm>operator class</firstterm> with optional parameters
    can be specified for each column of an index.
    The operator class identifies the operators to be
    used by the index for that column. For example, a B-tree index on
index ec8847ed406c99b1b35f61ebe896edc4d5a008c7..de9f17655c63203bc5cb87e7a1187cad96a26a58 100644 (file)
@@ -106,8 +106,9 @@ CREATE MATERIALIZED VIEW [ IF NOT EXISTS ] <replaceable>table_name</replaceable>
     <listitem>
      <para>
       This clause specifies optional storage parameters for the new
-      materialized view; see <xref linkend="sql-createtable-storage-parameters"
-      endterm="sql-createtable-storage-parameters-title"/> for more
+      materialized view; see
+      <xref linkend="sql-createtable-storage-parameters"/> in the
+      <xref linkend="sql-createtable"/> documentation for more
       information.  All parameters supported for <literal>CREATE
       TABLE</literal> are also supported for <literal>CREATE MATERIALIZED
       VIEW</literal>.
index c49c770dd0379eaa2678daecfdad3d9ddf0630f4..849f7e931fa5475cc0b415a6b8fdf322f2357929 100644 (file)
@@ -192,8 +192,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       can be written before <literal>TEMPORARY</literal> or <literal>TEMP</literal>.
       This presently makes no difference in <productname>PostgreSQL</productname>
       and is deprecated; see
-      <xref linkend="sql-createtable-compatibility"
-      endterm="sql-createtable-compatibility-title"/>.
+      <xref linkend="sql-createtable-compatibility"/> below.
      </para>
     </listitem>
    </varlistentry>
@@ -1201,8 +1200,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
     <listitem>
      <para>
       This clause specifies optional storage parameters for a table or index;
-      see <xref linkend="sql-createtable-storage-parameters"
-      endterm="sql-createtable-storage-parameters-title"/> for more
+      see <xref linkend="sql-createtable-storage-parameters"/> below for more
       information.  For backward-compatibility the <literal>WITH</literal>
       clause for a table can also include <literal>OIDS=FALSE</literal> to
       specify that rows of the new table should not contain OIDs (object
@@ -1302,8 +1300,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
 
   </variablelist>
 
-  <refsect2 id="sql-createtable-storage-parameters">
-   <title id="sql-createtable-storage-parameters-title">Storage Parameters</title>
+  <refsect2 id="sql-createtable-storage-parameters" xreflabel="Storage Parameters">
+   <title>Storage Parameters</title>
 
  <indexterm zone="sql-createtable-storage-parameters">
   <primary>storage parameters</primary>
@@ -2063,8 +2061,8 @@ CREATE TABLE cities_partdef
 </programlisting></para>
  </refsect1>
 
- <refsect1 id="sql-createtable-compatibility">
-  <title id="sql-createtable-compatibility-title">Compatibility</title>
+ <refsect1 id="sql-createtable-compatibility" xreflabel="Compatibility">
+  <title>Compatibility</title>
 
   <para>
    The <command>CREATE TABLE</command> command conforms to the
index 56d06838f1620d03d9473bd7539d0a07b860a46a..a4640929cfba6c2d59ff11507109cfebae9646fe 100644 (file)
@@ -140,8 +140,8 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI
     <listitem>
      <para>
       This clause specifies optional storage parameters for the new table;
-      see <xref linkend="sql-createtable-storage-parameters"
-      endterm="sql-createtable-storage-parameters-title"/> for more
+      see <xref linkend="sql-createtable-storage-parameters"/> in the
+      <xref linkend="sql-createtable"/> documentation for more
       information.   For backward-compatibility the <literal>WITH</literal>
       clause for a table can also include <literal>OIDS=FALSE</literal> to
       specify that rows of the new table should contain no OIDs (object
index 34ca9df2437d17a0b91369fdd18570a06524a049..d6177dcd9c44ed2cfab5ffb7caccda82ee5e97a7 100644 (file)
@@ -99,8 +99,8 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI
       <literal>NO SCROLL</literal> specifies that the cursor cannot be
       used to retrieve rows in a nonsequential fashion.  The default is to
       allow scrolling in some cases; this is not the same as specifying
-      <literal>SCROLL</literal>. See <xref linkend="sql-declare-notes"
-      endterm="sql-declare-notes-title"/> for details.
+      <literal>SCROLL</literal>. See <xref linkend="sql-declare-notes"/>
+      below for details.
      </para>
     </listitem>
    </varlistentry>
@@ -139,8 +139,8 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI
   </para>
  </refsect1>
 
- <refsect1 id="sql-declare-notes">
-  <title id="sql-declare-notes-title">Notes</title>
+ <refsect1 id="sql-declare-notes" xreflabel="Notes">
+  <title>Notes</title>
 
   <para>
    Normal cursors return data in text format, the same as a
index 08fb032b50569d08dcf60f689ce04b5766c8642a..ec3c40df2ea9dcfbbd4f78a62bfb82a48cab6028 100644 (file)
@@ -122,8 +122,8 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ *
      <para>
       A table expression allowing columns from other tables to appear
       in the <literal>WHERE</literal> condition.  This uses the same
-      syntax as the <xref linkend="sql-from" endterm="sql-from-title"/>
-      of a <command>SELECT</command> statement; for example, an alias
+      syntax as the <link linkend="sql-from"><literal>FROM</literal></link>
+      clause of a <command>SELECT</command> statement; for example, an alias
       for the table name can be specified.  Do not repeat the target
       table as a <replaceable class="parameter">from_item</replaceable>
       unless you wish to set up a self-join (in which case it must appear
index aab1f4b7e0828fe6e32111382cc031381efb46d8..1d887f3d179a1529047124f06a538387c166fb54 100644 (file)
@@ -94,9 +94,8 @@ EXECUTE <replaceable class="parameter">name</replaceable> [ ( <replaceable class
  <refsect1>
   <title>Examples</title>
   <para>
-    Examples are given in the <xref linkend="sql-prepare-examples"
-    endterm="sql-prepare-examples-title"/> section of the <xref
-    linkend="sql-prepare"/> documentation.
+    Examples are given in <xref linkend="sql-prepare-examples"/>
+    in the <xref linkend="sql-prepare"/> documentation.
    </para>
  </refsect1>
 
index a6cec6b02ea9bd1c791c7c681f2abe539ad56ccc..2973b72b8159b83080053d5fa2dcc3b929a7d163 100644 (file)
@@ -77,8 +77,7 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
   <para>
    <literal>ON CONFLICT</literal> can be used to specify an alternative
    action to raising a unique constraint or exclusion constraint
-   violation error. (See <xref linkend="sql-on-conflict"
-   endterm="sql-on-conflict-title"/> below.)
+   violation error. (See <xref linkend="sql-on-conflict"/> below.)
   </para>
 
   <para>
@@ -128,8 +127,8 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
  <refsect1>
   <title>Parameters</title>
 
-  <refsect2 id="sql-inserting-params">
-   <title id="sql-inserting-params-title">Inserting</title>
+  <refsect2>
+   <title>Inserting</title>
 
    <para>
     This section covers parameters that may be used when only
@@ -315,8 +314,8 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
     </variablelist>
   </refsect2>
 
-  <refsect2 id="sql-on-conflict">
-   <title id="sql-on-conflict-title"><literal>ON CONFLICT</literal> Clause</title>
+  <refsect2 id="sql-on-conflict" xreflabel="ON CONFLICT Clause">
+   <title><literal>ON CONFLICT</literal> Clause</title>
    <indexterm zone="sql-insert">
     <primary>UPSERT</primary>
    </indexterm>
index a225cea63b2afeb4beb0b5abbbb79ac7143a0540..0c4688603d9f9c251b7540390f0b5aee579f8b74 100644 (file)
@@ -202,9 +202,8 @@ LOCK [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ * ]
    <command>LOCK TABLE</command> is concerned, differing only in the rules
    about which modes conflict with which. For information on how to
    acquire an actual row-level lock, see <xref linkend="locking-rows"/>
-   and the <xref linkend="sql-for-update-share"
-   endterm="sql-for-update-share-title"/> in the <command>SELECT</command>
-   reference documentation.
+   and <xref linkend="sql-for-update-share"/>
+   in the <xref linkend="sql-select"/> documentation.
   </para>
  </refsect1>
 
index a9bc39716576acf1f8fe7ce0741a460e6b1df8d7..197b5c0d70e30afb2708008841d31a33f79e986a 100644 (file)
@@ -387,12 +387,12 @@ PostgreSQL documentation
         selected by writing multiple <option>-n</option> switches.  The
         <replaceable class="parameter">pattern</replaceable> parameter is
         interpreted as a pattern according to the same rules used by
-        <application>psql</application>'s <literal>\d</literal> commands (see <xref
-        linkend="app-psql-patterns" endterm="app-psql-patterns-title"/>),
+        <application>psql</application>'s <literal>\d</literal> commands
+        (see <xref linkend="app-psql-patterns"/> below),
         so multiple schemas can also be selected by writing wildcard characters
         in the pattern.  When using wildcards, be careful to quote the pattern
         if needed to prevent the shell from expanding the wildcards;  see
-        <xref linkend="pg-dump-examples" endterm="pg-dump-examples-title"/>.
+        <xref linkend="pg-dump-examples"/> below.
        </para>
 
        <note>
@@ -524,12 +524,12 @@ PostgreSQL documentation
         can be selected by writing multiple <option>-t</option> switches.  The
         <replaceable class="parameter">pattern</replaceable> parameter is
         interpreted as a pattern according to the same rules used by
-        <application>psql</application>'s <literal>\d</literal> commands (see <xref
-        linkend="app-psql-patterns" endterm="app-psql-patterns-title"/>),
+        <application>psql</application>'s <literal>\d</literal> commands
+        (see <xref linkend="app-psql-patterns"/> below),
         so multiple tables can also be selected by writing wildcard characters
         in the pattern.  When using wildcards, be careful to quote the pattern
         if needed to prevent the shell from expanding the wildcards;  see
-        <xref linkend="pg-dump-examples" endterm="pg-dump-examples-title"/>.
+        <xref linkend="pg-dump-examples"/> below.
        </para>
 
        <para>
@@ -777,12 +777,12 @@ PostgreSQL documentation
         <option>--include-foreign-data</option> switches.
         Also, the <replaceable class="parameter">foreignserver</replaceable> parameter is
         interpreted as a pattern according to the same rules used by
-        <application>psql</application>'s <literal>\d</literal> commands (see <xref
-        linkend="app-psql-patterns" endterm="app-psql-patterns-title"/>),
+        <application>psql</application>'s <literal>\d</literal> commands
+        (see <xref linkend="app-psql-patterns"/> below),
         so multiple foreign servers can also be selected by writing wildcard characters
         in the pattern.  When using wildcards, be careful to quote the pattern
         if needed to prevent the shell from expanding the wildcards; see
-        <xref linkend="pg-dump-examples" endterm="pg-dump-examples-title"/>.
+        <xref linkend="pg-dump-examples"/> below.
         The only exception is that an empty pattern is disallowed.
        </para>
 
@@ -1367,8 +1367,8 @@ CREATE DATABASE foo WITH TEMPLATE template0;
   </para>
  </refsect1>
 
- <refsect1 id="pg-dump-examples">
-  <title id="pg-dump-examples-title">Examples</title>
+ <refsect1 id="pg-dump-examples" xreflabel="Examples">
+  <title>Examples</title>
 
   <para>
    To dump a database called <literal>mydb</literal> into a SQL-script file:
@@ -1477,8 +1477,7 @@ CREATE DATABASE foo WITH TEMPLATE template0;
   <para>
    To specify an upper-case or mixed-case name in <option>-t</option> and related
    switches, you need to double-quote the name; else it will be folded to
-   lower case (see <xref
-   linkend="app-psql-patterns" endterm="app-psql-patterns-title"/>).  But
+   lower case (see <xref linkend="app-psql-patterns"/> below).  But
    double quotes are special to the shell, so in turn they must be quoted.
    Thus, to dump a single table with a mixed-case name, you need something
    like
index f0859896c547a3c06b1e53e5feffd533dbecbbc3..40ca31bfdfe605b06375bfc6896cfb8db10cd244 100644 (file)
@@ -310,8 +310,7 @@ PostgreSQL documentation
         <replaceable class="parameter">pattern</replaceable> parameter is
         interpreted as a pattern according to the same rules used by
         <application>psql</application>'s <literal>\d</literal>
-        commands (see <xref
-        linkend="app-psql-patterns" endterm="app-psql-patterns-title"/>),
+        commands (see <xref linkend="app-psql-patterns"/> below),
         so multiple databases can also be excluded by writing wildcard
         characters in the pattern.  When using wildcards, be careful to
         quote the pattern if needed to prevent shell wildcard expansion.
index 1a4b7c7825d540a3b2b60c83818694ee98f41fa8..5e5794bc90d8bb59f7117ecc6803b8bc6f8e2996 100644 (file)
@@ -530,8 +530,7 @@ PostgreSQL documentation
 
     <para>
      The following options only apply to the single-user mode
-     (see <xref linkend="app-postgres-single-user"
-     endterm="app-postgres-single-user-title"/>).
+     (see <xref linkend="app-postgres-single-user"/> below).
     </para>
 
     <variablelist>
@@ -753,8 +752,8 @@ PostgreSQL documentation
   </para>
  </refsect1>
 
- <refsect1 id="app-postgres-single-user">
-  <title id="app-postgres-single-user-title">Single-User Mode</title>
+ <refsect1 id="app-postgres-single-user" xreflabel="Single-User Mode">
+  <title>Single-User Mode</title>
 
    <para>
     To start a single-user mode server, use a command like
index 4e5e96a4014d09c29f135fdfe92bc2bddc0f1fc6..5ec86aee10d30192e7686951ed7fab85afa2dc64 100644 (file)
@@ -208,8 +208,8 @@ EXPLAIN EXECUTE <replaceable>name</replaceable>(<replaceable>parameter_values</r
   </para>
  </refsect1>
 
- <refsect1 id="sql-prepare-examples">
-  <title id="sql-prepare-examples-title">Examples</title>
+ <refsect1 id="sql-prepare-examples" xreflabel="Examples">
+  <title>Examples</title>
   <para>
    Create a prepared statement for an <command>INSERT</command>
    statement, and then execute it:
index de303c8814465444c5054c0c1e9064ba019eed1e..07bf272a201636e6fd16fcab0c003e4cb712fbcd 100644 (file)
@@ -809,7 +809,7 @@ testdb=&gt;
     If an unquoted colon (<literal>:</literal>) followed by a
     <application>psql</application> variable name appears within an argument, it is
     replaced by the variable's value, as described in <xref
-    linkend="app-psql-interpolation" endterm="app-psql-interpolation-title"/>.
+    linkend="app-psql-interpolation"/> below.
     The forms <literal>:'<replaceable>variable_name</replaceable>'</literal> and
     <literal>:"<replaceable>variable_name</replaceable>"</literal> described there
     work as well.
@@ -1163,8 +1163,7 @@ testdb=&gt;
         also shown.  For foreign tables, the associated foreign
         server is shown as well.
         (<quote>Matching the pattern</quote> is defined in
-        <xref linkend="app-psql-patterns" endterm="app-psql-patterns-title"/>
-        below.)
+        <xref linkend="app-psql-patterns"/> below.)
         </para>
 
         <para>
@@ -1946,9 +1945,8 @@ testdb=&gt;
 
         <tip>
         <para>
-        See under <xref linkend="app-psql-environment"
-        endterm="app-psql-environment-title"/> for how to configure and
-        customize your editor.
+        See <xref linkend="app-psql-environment"/>, below, for how to
+        configure and customize your editor.
         </para>
         </tip>
         </listitem>
@@ -2022,9 +2020,8 @@ Tue Oct 26 21:40:57 CEST 1999
 
         <tip>
         <para>
-        See under <xref linkend="app-psql-environment"
-        endterm="app-psql-environment-title"/> for how to configure and
-        customize your editor.
+        See <xref linkend="app-psql-environment"/>, below, for how to
+        configure and customize your editor.
         </para>
         </tip>
         </listitem>
@@ -2230,8 +2227,8 @@ CREATE INDEX
         <listitem>
         <para>
          Sends the current query buffer to the server and stores the
-         query's output into <application>psql</application> variables (see <xref
-         linkend="app-psql-variables" endterm="app-psql-variables-title"/>).
+         query's output into <application>psql</application> variables
+         (see <xref linkend="app-psql-variables"/> below).
          The query to be executed must return exactly one row.  Each column of
          the row is stored into a separate variable, named the same as the
          column.  For example:
@@ -3078,8 +3075,7 @@ lo_import 152801
 
         <para>
         Illustrations of how these different formats look can be seen in
-        the <xref linkend="app-psql-examples"
-        endterm="app-psql-examples-title"/> section.
+        <xref linkend="app-psql-examples"/>, below.
         </para>
 
         <tip>
@@ -3163,9 +3159,7 @@ lo_import 152801
 
         <para>
         Valid variable names can contain letters, digits, and
-        underscores. See the section <xref
-        linkend="app-psql-variables"
-        endterm="app-psql-variables-title"/> below for details.
+        underscores. See <xref linkend="app-psql-variables"/> below for details.
         Variable names are case-sensitive.
         </para>
 
@@ -3173,8 +3167,7 @@ lo_import 152801
         Certain variables are special, in that they
         control <application>psql</application>'s behavior or are
         automatically set to reflect connection state.  These variables are
-        documented in <xref linkend="app-psql-variables"
-        endterm="app-psql-variables-title"/>, below.
+        documented in <xref linkend="app-psql-variables"/>, below.
         </para>
 
         <note>
@@ -3318,8 +3311,7 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
         Most variables that control <application>psql</application>'s behavior
         cannot be unset; instead, an <literal>\unset</literal> command is interpreted
         as setting them to their default values.
-        See <xref linkend="app-psql-variables"
-        endterm="app-psql-variables-title"/>, below.
+        See <xref linkend="app-psql-variables"/> below.
         </para>
         </listitem>
       </varlistentry>
@@ -3489,8 +3481,8 @@ select 1\; select 2\; select 3;
     </variablelist>
   </para>
 
-  <refsect3 id="app-psql-patterns">
-   <title id="app-psql-patterns-title">Patterns</title>
+  <refsect3 id="app-psql-patterns" xreflabel="Patterns">
+   <title>Patterns</title>
 
    <indexterm>
     <primary>patterns</primary>
@@ -3582,8 +3574,8 @@ select 1\; select 2\; select 3;
  <refsect2>
   <title>Advanced Features</title>
 
-   <refsect3 id="app-psql-variables">
-    <title id="app-psql-variables-title">Variables</title>
+   <refsect3 id="app-psql-variables" xreflabel="Variables">
+    <title>Variables</title>
 
     <para>
     <application>psql</application> provides variable substitution
@@ -3607,8 +3599,7 @@ testdb=&gt; <userinput>\echo :foo</userinput>
 bar
 </programlisting>
     This works in both regular SQL commands and meta-commands; there is
-    more detail in <xref linkend="app-psql-interpolation"
-    endterm="app-psql-interpolation-title"/>, below.
+    more detail in <xref linkend="app-psql-interpolation"/>, below.
     </para>
 
     <para>
@@ -4016,8 +4007,7 @@ bar
         <para>
         These specify what the prompts <application>psql</application>
         issues should look like. See <xref
-        linkend="app-psql-prompting"
-        endterm="app-psql-prompting-title"/> below.
+        linkend="app-psql-prompting"/> below.
         </para>
         </listitem>
       </varlistentry>
@@ -4151,8 +4141,8 @@ bar
 
    </refsect3>
 
-   <refsect3 id="app-psql-interpolation">
-    <title id="app-psql-interpolation-title"><acronym>SQL</acronym> Interpolation</title>
+   <refsect3 id="app-psql-interpolation" xreflabel="SQL Interpolation">
+    <title><acronym>SQL</acronym> Interpolation</title>
 
     <para>
     A key feature of <application>psql</application>
@@ -4236,8 +4226,8 @@ testdb=&gt; <userinput>INSERT INTO my_table VALUES (:'content');</userinput>
 
    </refsect3>
 
-   <refsect3 id="app-psql-prompting">
-    <title id="app-psql-prompting-title">Prompting</title>
+   <refsect3 id="app-psql-prompting" xreflabel="Prompting">
+    <title>Prompting</title>
 
     <para>
     The prompts <application>psql</application> issues can be customized
@@ -4393,9 +4383,8 @@ testdb=&gt; <userinput>INSERT INTO my_table VALUES (:'content');</userinput>
         <listitem>
         <para>
         The value of the <application>psql</application> variable
-        <replaceable class="parameter">name</replaceable>. See the
-        section <xref linkend="app-psql-variables"
-        endterm="app-psql-variables-title"/> for details.
+        <replaceable class="parameter">name</replaceable>. See
+        <xref linkend="app-psql-variables"/>, above, for details.
         </para>
         </listitem>
       </varlistentry>
@@ -4492,8 +4481,8 @@ $endif
  </refsect1>
 
 
- <refsect1 id="app-psql-environment">
-  <title id="app-psql-environment-title">Environment</title>
+ <refsect1 id="app-psql-environment" xreflabel="Environment">
+  <title>Environment</title>
 
   <variablelist>
 
@@ -4798,8 +4787,8 @@ PSQL_EDITOR_LINENUMBER_ARG='--line '
  </refsect1>
 
 
- <refsect1 id="app-psql-examples">
-  <title id="app-psql-examples-title">Examples</title>
+ <refsect1 id="app-psql-examples" xreflabel="Examples">
+  <title>Examples</title>
 
   <para>
   The first example shows how to spread a command over several lines of
index c54a7c420d426e6d277b0457d4db56d13a5fd064..aac5d5be23f4f381a30e25d641ee391302fce677 100644 (file)
@@ -163,8 +163,7 @@ REINDEX [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] { IN
       updates, or deletes on the table; whereas a standard index rebuild
       locks out writes (but not reads) on the table until it's done.
       There are several caveats to be aware of when using this option
-      &mdash; see <xref linkend="sql-reindex-concurrently"
-      endterm="sql-reindex-concurrently-title"/>.
+      &mdash; see <xref linkend="sql-reindex-concurrently"/> below.
      </para>
      <para>
       For temporary tables, <command>REINDEX</command> is always
@@ -264,8 +263,8 @@ REINDEX [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] { IN
    Each individual partition can be reindexed separately instead.
   </para>
 
-  <refsect2 id="sql-reindex-concurrently">
-   <title id="sql-reindex-concurrently-title">Rebuilding Indexes Concurrently</title>
+  <refsect2 id="sql-reindex-concurrently" xreflabel="Rebuilding Indexes Concurrently">
+   <title>Rebuilding Indexes Concurrently</title>
 
    <indexterm zone="sql-reindex-concurrently">
     <primary>index</primary>
index 91388151ad40858f09b159219df4c68a73fe9a2b..475281dd7be61b520f0acf858340e1cccff4f1e1 100644 (file)
@@ -95,7 +95,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
       that is referenced more than once in <literal>FROM</literal> is
       computed only once,
       unless specified otherwise with <literal>NOT MATERIALIZED</literal>.
-      (See <xref linkend="sql-with" endterm="sql-with-title"/> below.)
+      (See <xref linkend="sql-with"/> below.)
      </para>
     </listitem>
 
@@ -105,7 +105,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
       (Each element in the <literal>FROM</literal> list is a real or
       virtual table.)  If more than one element is specified in the
       <literal>FROM</literal> list, they are cross-joined together.
-      (See <xref linkend="sql-from" endterm="sql-from-title"/> below.)
+      (See <xref linkend="sql-from"/> below.)
      </para>
     </listitem>
 
@@ -113,8 +113,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
      <para>
       If the <literal>WHERE</literal> clause is specified, all rows
       that do not satisfy the condition are eliminated from the
-      output.  (See <xref linkend="sql-where"
-      endterm="sql-where-title"/> below.)
+      output.  (See <xref linkend="sql-where"/> below.)
      </para>
     </listitem>
 
@@ -126,8 +125,8 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
       values, and the results of aggregate functions are computed.
       If the <literal>HAVING</literal> clause is present, it
       eliminates groups that do not satisfy the given condition.  (See
-      <xref linkend="sql-groupby" endterm="sql-groupby-title"/> and
-      <xref linkend="sql-having" endterm="sql-having-title"/> below.)
+      <xref linkend="sql-groupby"/> and
+      <xref linkend="sql-having"/> below.)
      </para>
     </listitem>
 
@@ -135,9 +134,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
      <para>
       The actual output rows are computed using the
       <command>SELECT</command> output expressions for each selected
-      row or row group.  (See
-      <xref linkend="sql-select-list" endterm="sql-select-list-title"/>
-      below.)
+      row or row group.  (See <xref linkend="sql-select-list"/> below.)
      </para>
     </listitem>
 
@@ -146,8 +143,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
       result.  <literal>SELECT DISTINCT ON</literal> eliminates rows that
       match on all the specified expressions.  <literal>SELECT ALL</literal>
       (the default) will return all candidate rows, including
-      duplicates.  (See <xref linkend="sql-distinct"
-      endterm="sql-distinct-title"/> below.)
+      duplicates.  (See <xref linkend="sql-distinct"/> below.)
      </para>
     </listitem>
 
@@ -168,9 +164,8 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
       eliminating duplicate rows.  Notice that <literal>DISTINCT</literal> is
       the default behavior here, even though <literal>ALL</literal> is
       the default for <command>SELECT</command> itself.  (See
-      <xref linkend="sql-union" endterm="sql-union-title"/>, <xref
-      linkend="sql-intersect" endterm="sql-intersect-title"/>, and
-      <xref linkend="sql-except" endterm="sql-except-title"/> below.)
+      <xref linkend="sql-union"/>, <xref linkend="sql-intersect"/>, and
+      <xref linkend="sql-except"/> below.)
      </para>
     </listitem>
 
@@ -180,7 +175,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
       returned rows are sorted in the specified order.  If
       <literal>ORDER BY</literal> is not given, the rows are returned
       in whatever order the system finds fastest to produce.  (See
-      <xref linkend="sql-orderby" endterm="sql-orderby-title"/> below.)
+      <xref linkend="sql-orderby"/> below.)
      </para>
     </listitem>
 
@@ -189,7 +184,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
       If the <literal>LIMIT</literal> (or <literal>FETCH FIRST</literal>) or <literal>OFFSET</literal>
       clause is specified, the <command>SELECT</command> statement
       only returns a subset of the result rows. (See <xref
-      linkend="sql-limit" endterm="sql-limit-title"/> below.)
+      linkend="sql-limit"/> below.)
      </para>
     </listitem>
 
@@ -199,8 +194,8 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
       or <literal>FOR KEY SHARE</literal>
       is specified, the
       <command>SELECT</command> statement locks the selected rows
-      against concurrent updates.  (See <xref linkend="sql-for-update-share"
-      endterm="sql-for-update-share-title"/> below.)
+      against concurrent updates.  (See <xref linkend="sql-for-update-share"/>
+      below.)
      </para>
     </listitem>
    </orderedlist>
@@ -219,8 +214,8 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
  <refsect1>
   <title>Parameters</title>
 
-  <refsect2 id="sql-with">
-   <title id="sql-with-title"><literal>WITH</literal> Clause</title>
+  <refsect2 id="sql-with" xreflabel="WITH Clause">
+   <title><literal>WITH</literal> Clause</title>
 
    <para>
     The <literal>WITH</literal> clause allows you to specify one or more
@@ -336,8 +331,8 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
    </para>
   </refsect2>
 
-  <refsect2 id="sql-from">
-   <title id="sql-from-title"><literal>FROM</literal> Clause</title>
+  <refsect2 id="sql-from" xreflabel="FROM Clause">
+   <title><literal>FROM</literal> Clause</title>
 
    <para>
     The <literal>FROM</literal> clause specifies one or more source
@@ -707,8 +702,8 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
    </para>
   </refsect2>
 
-  <refsect2 id="sql-where">
-   <title id="sql-where-title"><literal>WHERE</literal> Clause</title>
+  <refsect2 id="sql-where" xreflabel="WHERE Clause">
+   <title><literal>WHERE</literal> Clause</title>
 
    <para>
     The optional <literal>WHERE</literal> clause has the general form
@@ -724,8 +719,8 @@ WHERE <replaceable class="parameter">condition</replaceable>
    </para>
   </refsect2>
 
-  <refsect2 id="sql-groupby">
-   <title id="sql-groupby-title"><literal>GROUP BY</literal> Clause</title>
+  <refsect2 id="sql-groupby" xreflabel="GROUP BY Clause">
+   <title><literal>GROUP BY</literal> Clause</title>
 
    <para>
     The optional <literal>GROUP BY</literal> clause has the general form
@@ -798,8 +793,8 @@ GROUP BY <replaceable class="parameter">grouping_element</replaceable> [, ...]
    </para>
   </refsect2>
 
-  <refsect2 id="sql-having">
-   <title id="sql-having-title"><literal>HAVING</literal> Clause</title>
+  <refsect2 id="sql-having" xreflabel="HAVING Clause">
+   <title><literal>HAVING</literal> Clause</title>
 
    <para>
     The optional <literal>HAVING</literal> clause has the general form
@@ -841,8 +836,8 @@ HAVING <replaceable class="parameter">condition</replaceable>
    </para>
   </refsect2>
 
-  <refsect2 id="sql-window">
-   <title id="sql-window-title"><literal>WINDOW</literal> Clause</title>
+  <refsect2 id="sql-window" xreflabel="WINDOW Clause">
+   <title><literal>WINDOW</literal> Clause</title>
 
    <para>
     The optional <literal>WINDOW</literal> clause has the general form
@@ -874,8 +869,8 @@ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceabl
 
    <para>
     The elements of the <literal>PARTITION BY</literal> list are interpreted in
-    much the same fashion as elements of a
-    <xref linkend="sql-groupby" endterm="sql-groupby-title"/>, except that
+    much the same fashion as elements of a <link
+    linkend="sql-groupby"><literal>GROUP BY</literal></link> clause, except that
     they are always simple expressions and never the name or number of an
     output column.
     Another difference is that these expressions can contain aggregate
@@ -886,8 +881,8 @@ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceabl
 
    <para>
     Similarly, the elements of the <literal>ORDER BY</literal> list are interpreted
-    in much the same fashion as elements of an
-    <xref linkend="sql-orderby" endterm="sql-orderby-title"/>, except that
+    in much the same fashion as elements of a statement-level <link
+    linkend="sql-orderby"><literal>ORDER BY</literal></link> clause, except that
     the expressions are always taken as simple expressions and never the name
     or number of an output column.
    </para>
@@ -1011,8 +1006,9 @@ EXCLUDE NO OTHERS
    <para>
     The purpose of a <literal>WINDOW</literal> clause is to specify the
     behavior of <firstterm>window functions</firstterm> appearing in the query's
-    <xref linkend="sql-select-list" endterm="sql-select-list-title"/> or
-    <xref linkend="sql-orderby" endterm="sql-orderby-title"/>.  These functions
+    <link linkend="sql-select-list"><command>SELECT</command> list</link> or
+    <link linkend="sql-orderby"><literal>ORDER BY</literal></link> clause.
+    These functions
     can reference the <literal>WINDOW</literal> clause entries by name
     in their <literal>OVER</literal> clauses.  A <literal>WINDOW</literal> clause
     entry does not have to be referenced anywhere, however; if it is not
@@ -1038,8 +1034,8 @@ EXCLUDE NO OTHERS
    </para>
   </refsect2>
 
-  <refsect2 id="sql-select-list">
-   <title id="sql-select-list-title"><command>SELECT</command> List</title>
+  <refsect2 id="sql-select-list" xreflabel="SELECT List">
+   <title><command>SELECT</command> List</title>
 
    <para>
     The <command>SELECT</command> list (between the key words
@@ -1119,8 +1115,8 @@ EXCLUDE NO OTHERS
    </note>
   </refsect2>
 
-  <refsect2 id="sql-distinct">
-   <title id="sql-distinct-title"><literal>DISTINCT</literal> Clause</title>
+  <refsect2 id="sql-distinct" xreflabel="DISTINCT Clause">
+   <title><literal>DISTINCT</literal> Clause</title>
 
    <para>
     If <literal>SELECT DISTINCT</literal> is specified, all duplicate rows are
@@ -1164,8 +1160,8 @@ SELECT DISTINCT ON (location) location, time, report
    </para>
   </refsect2>
 
-  <refsect2 id="sql-union">
-   <title id="sql-union-title"><literal>UNION</literal> Clause</title>
+  <refsect2 id="sql-union" xreflabel="UNION Clause">
+   <title><literal>UNION</literal> Clause</title>
 
    <para>
     The <literal>UNION</literal> clause has this general form:
@@ -1217,8 +1213,8 @@ SELECT DISTINCT ON (location) location, time, report
    </para>
   </refsect2>
 
-  <refsect2 id="sql-intersect">
-   <title id="sql-intersect-title"><literal>INTERSECT</literal> Clause</title>
+  <refsect2 id="sql-intersect" xreflabel="INTERSECT Clause">
+   <title><literal>INTERSECT</literal> Clause</title>
 
    <para>
     The <literal>INTERSECT</literal> clause has this general form:
@@ -1265,8 +1261,8 @@ SELECT DISTINCT ON (location) location, time, report
    </para>
   </refsect2>
 
-  <refsect2 id="sql-except">
-   <title id="sql-except-title"><literal>EXCEPT</literal> Clause</title>
+  <refsect2 id="sql-except" xreflabel="EXCEPT Clause">
+   <title><literal>EXCEPT</literal> Clause</title>
 
    <para>
     The <literal>EXCEPT</literal> clause has this general form:
@@ -1309,8 +1305,8 @@ SELECT DISTINCT ON (location) location, time, report
    </para>
   </refsect2>
 
-  <refsect2 id="sql-orderby">
-   <title id="sql-orderby-title"><literal>ORDER BY</literal> Clause</title>
+  <refsect2 id="sql-orderby" xreflabel="ORDER BY Clause">
+   <title><literal>ORDER BY</literal> Clause</title>
 
    <para>
     The optional <literal>ORDER BY</literal> clause has this general form:
@@ -1407,8 +1403,8 @@ SELECT name FROM distributors ORDER BY code;
    </para>
   </refsect2>
 
-  <refsect2 id="sql-limit">
-   <title id="sql-limit-title"><literal>LIMIT</literal> Clause</title>
+  <refsect2 id="sql-limit" xreflabel="LIMIT Clause">
+   <title><literal>LIMIT</literal> Clause</title>
 
    <para>
     The <literal>LIMIT</literal> clause consists of two independent
@@ -1492,8 +1488,8 @@ FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] {
    </para>
   </refsect2>
 
-  <refsect2 id="sql-for-update-share">
-   <title id="sql-for-update-share-title">The Locking Clause</title>
+  <refsect2 id="sql-for-update-share" xreflabel="The Locking Clause">
+   <title>The Locking Clause</title>
 
    <para>
     <literal>FOR UPDATE</literal>, <literal>FOR NO KEY UPDATE</literal>, <literal>FOR SHARE</literal>
@@ -2086,7 +2082,7 @@ SELECT distributors.* WHERE distributors.name = 'Westward';
     used by <productname>MySQL</productname>.  The SQL:2008 standard
     has introduced the clauses <literal>OFFSET ... FETCH {FIRST|NEXT}
     ...</literal> for the same functionality, as shown above
-    in <xref linkend="sql-limit" endterm="sql-limit-title"/>.  This
+    in <xref linkend="sql-limit"/>.  This
     syntax is also used by <productname>IBM DB2</productname>.
     (Applications written for <productname>Oracle</productname>
     frequently use a workaround involving the automatically
index f2891a3b0a72b06eb127b8219e18fa31b976c5a3..3fa54e5f703b0c55bb237649a03a3746d98e12f4 100644 (file)
@@ -172,8 +172,9 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [
      <para>
       A table expression allowing columns from other tables to appear in
       the <literal>WHERE</literal> condition and update expressions. This
-      uses the same syntax as the <xref linkend="sql-from"
-      endterm="sql-from-title"/> of a <command>SELECT</command> statement;
+      uses the same syntax as the <link
+      linkend="sql-from"><literal>FROM</literal></link> clause of
+      a <command>SELECT</command> statement;
       for example, an alias for the table name can be specified.  Do not
       repeat the target table as a <replaceable>from_item</replaceable>
       unless you intend a self-join (in which case it must appear with
index 849220b12064359cf825e32c8d8a6dcb0a626590..d3a3aaff1408a2c35062abfe892359c832e36c49 100644 (file)
@@ -85,7 +85,8 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, ..
       rows.  This expression can refer to the columns of the
       <command>VALUES</command> result as <literal>column1</literal>, <literal>column2</literal>,
       etc.  For more details see
-      <xref linkend="sql-orderby" endterm="sql-orderby-title"/>.
+      <xref linkend="sql-orderby"/>
+      in the <xref linkend="sql-select"/> documentation.
      </para>
     </listitem>
    </varlistentry>
@@ -95,7 +96,8 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, ..
     <listitem>
      <para>
       A sorting operator.  For details see
-      <xref linkend="sql-orderby" endterm="sql-orderby-title"/>.
+      <xref linkend="sql-orderby"/>
+      in the <xref linkend="sql-select"/> documentation.
      </para>
     </listitem>
    </varlistentry>
@@ -105,7 +107,8 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, ..
     <listitem>
      <para>
       The maximum number of rows to return.  For details see
-      <xref linkend="sql-limit" endterm="sql-limit-title"/>.
+      <xref linkend="sql-limit"/>
+      in the <xref linkend="sql-select"/> documentation.
      </para>
     </listitem>
    </varlistentry>
@@ -115,8 +118,8 @@ VALUES ( <replaceable class="parameter">expression</replaceable> [, ...] ) [, ..
     <listitem>
      <para>
       The number of rows to skip before starting to return rows.
-      For details see
-      <xref linkend="sql-limit" endterm="sql-limit-title"/>.
+      For details see <xref linkend="sql-limit"/>
+      in the <xref linkend="sql-select"/> documentation.
      </para>
     </listitem>
    </varlistentry>