mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
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
This commit is contained in:
@@ -1152,7 +1152,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
|
||||
constraint that is not deferrable will be checked immediately
|
||||
after every command. Checking of constraints that are
|
||||
deferrable can be postponed until the end of the transaction
|
||||
(using the <xref linkend="sql-set-constraints"/> command).
|
||||
(using the <link linkend="sql-set-constraints"><command>SET CONSTRAINTS</command></link> command).
|
||||
<literal>NOT DEFERRABLE</literal> is the default.
|
||||
Currently, only <literal>UNIQUE</literal>, <literal>PRIMARY KEY</literal>,
|
||||
<literal>EXCLUDE</literal>, and
|
||||
@@ -1176,7 +1176,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
|
||||
statement. This is the default. If the constraint is
|
||||
<literal>INITIALLY DEFERRED</literal>, it is checked only at the
|
||||
end of the transaction. The constraint check time can be
|
||||
altered with the <xref linkend="sql-set-constraints"/> command.
|
||||
altered with the <link linkend="sql-set-constraints"><command>SET CONSTRAINTS</command></link> command.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1244,8 +1244,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
|
||||
<listitem>
|
||||
<para>
|
||||
All rows in the temporary table will be deleted at the end
|
||||
of each transaction block. Essentially, an automatic <xref
|
||||
linkend="sql-truncate"/> is done
|
||||
of each transaction block. Essentially, an automatic <link
|
||||
linkend="sql-truncate"><command>TRUNCATE</command></link> is done
|
||||
at each commit. When used on a partitioned table, this
|
||||
is not cascaded to its partitions.
|
||||
</para>
|
||||
@@ -1430,7 +1430,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
|
||||
Disabling index cleanup can speed up <command>VACUUM</command> very
|
||||
significantly, but may also lead to severely bloated indexes if table
|
||||
modifications are frequent. The <literal>INDEX_CLEANUP</literal>
|
||||
parameter of <xref linkend="sql-vacuum"/>, if specified, overrides
|
||||
parameter of <link linkend="sql-vacuum"><command>VACUUM</command></link>, if specified, overrides
|
||||
the value of this option.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -1451,7 +1451,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
|
||||
the truncated pages is returned to the operating system.
|
||||
Note that the truncation requires <literal>ACCESS EXCLUSIVE</literal>
|
||||
lock on the table. The <literal>TRUNCATE</literal> parameter
|
||||
of <xref linkend="sql-vacuum"/>, if specified, overrides the value
|
||||
of <link linkend="sql-vacuum"><command>VACUUM</command></link>, if specified, overrides the value
|
||||
of this option.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
Reference in New Issue
Block a user