mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +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:
@@ -51,7 +51,7 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <xref linkend="sql-security-label"/> statement allows assignment of
|
||||
The <link linkend="sql-security-label"><command>SECURITY LABEL</command></link> statement allows assignment of
|
||||
a security label to a database object.
|
||||
</para>
|
||||
|
||||
@@ -451,7 +451,7 @@ UPDATE t1 SET x = 2, y = func1(y) WHERE z = 100;
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<xref linkend="sql-createdatabase"/> additionally requires
|
||||
<link linkend="sql-createdatabase"><command>CREATE DATABASE</command></link> additionally requires
|
||||
<literal>getattr</literal> permission for the source or template database.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -509,7 +509,7 @@ UPDATE t1 SET x = 2, y = func1(y) WHERE z = 100;
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Using <xref linkend="sql-security-label"/> on an object additionally
|
||||
Using <link linkend="sql-security-label"><command>SECURITY LABEL</command></link> on an object additionally
|
||||
requires <literal>relabelfrom</literal> permission for the object in
|
||||
conjunction with its old security label and <literal>relabelto</literal>
|
||||
permission for the object in conjunction with its new security label.
|
||||
@@ -644,7 +644,7 @@ ERROR: SELinux: security policy violation
|
||||
<sect3>
|
||||
<title>Miscellaneous</title>
|
||||
<para>
|
||||
We reject the <xref linkend="sql-load"/> command across the board, because
|
||||
We reject the <link linkend="sql-load"><command>LOAD</command></link> command across the board, because
|
||||
any module loaded could easily circumvent security policy enforcement.
|
||||
</para>
|
||||
|
||||
|
Reference in New Issue
Block a user