diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2020-10-03 16:16:51 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2020-10-03 16:40:02 +0200 |
commit | 9081bddbd75e4e8994ca243c820ca63387bd33f7 (patch) | |
tree | a9e9f66b96fa16067375262a99a39e4b9a501254 /doc/src/sgml/ref/select.sgml | |
parent | 1a9388bd0fefccc81430192d0b2c87938bb62d38 (diff) | |
download | postgresql-9081bddbd75e4e8994ca243c820ca63387bd33f7.tar.gz postgresql-9081bddbd75e4e8994ca243c820ca63387bd33f7.zip |
Improve <xref> vs. <command> formatting in the documentation
SQL commands are generally marked up as <command>, except when a link
to a reference page is used using <xref>. But the latter doesn't
create monospace markup, so this looks strange especially when a
paragraph contains a mix of links and non-links.
We considered putting <command> in the <refentrytitle> on the target
side, but that creates some formatting side effects elsewhere.
Generally, it seems safer to solve this on the link source side.
We can't put the <xref> inside the <command>; the DTD doesn't allow
this. DocBook 5 would allow the <command> to have the linkend
attribute itself, but we are not there yet.
So to solve this for now, convert the <xref>s to <link> plus
<command>. This gives the correct look and also gives some more
flexibility what we can put into the link text (e.g., subcommands or
other clauses). In the future, these could then be converted to
DocBook 5 style.
I haven't converted absolutely all xrefs to SQL command reference
pages, only those where we care about the appearance of the link text
or where it was otherwise appropriate to make the appearance match a
bit better. Also in some cases, the links where repetitive, so in
those cases the links where just removed and replaced by a plain
<command>. In cases where we just want the link and don't
specifically care about the generated link text (typically phrased
"for further information see <xref ...>") the xref is kept.
Reported-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Discussion: https://www.postgresql.org/message-id/flat/87o8pco34z.fsf@wibble.ilmari.org
Diffstat (limited to 'doc/src/sgml/ref/select.sgml')
-rw-r--r-- | doc/src/sgml/ref/select.sgml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index b93e4ca208b..b4dea9b6acf 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -446,7 +446,7 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] sub-<command>SELECT</command> must be surrounded by parentheses, and an alias <emphasis>must</emphasis> be provided for it. A - <xref linkend="sql-values"/> command + <link linkend="sql-values"><command>VALUES</command></link> command can also be used here. </para> </listitem> @@ -1534,7 +1534,7 @@ KEY SHARE to the row-level lock(s) — the required <literal>ROW SHARE</literal> table-level lock is still taken in the ordinary way (see <xref linkend="mvcc"/>). You can use - <xref linkend="sql-lock"/> + <link linkend="sql-lock"><command>LOCK</command></link> with the <literal>NOWAIT</literal> option first, if you need to acquire the table-level lock without waiting. </para> |