1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-28 18:48:04 +03:00

Doc: fix "Unresolved ID reference" warnings, clean up man page cross-refs.

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
This commit is contained in:
Tom Lane
2020-05-11 14:15:49 -04:00
parent 624686abcf
commit 60c90c16c1
26 changed files with 167 additions and 193 deletions

View 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