Improve <xref> vs. <command> formatting in the documentation
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 3 Oct 2020 14:16:51 +0000 (16:16 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 3 Oct 2020 14:40:02 +0000 (16:40 +0200)
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

92 files changed:
doc/src/sgml/backup.sgml
doc/src/sgml/catalogs.sgml
doc/src/sgml/config.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/dml.sgml
doc/src/sgml/ecpg.sgml
doc/src/sgml/extend.sgml
doc/src/sgml/logical-replication.sgml
doc/src/sgml/maintenance.sgml
doc/src/sgml/monitoring.sgml
doc/src/sgml/mvcc.sgml
doc/src/sgml/perform.sgml
doc/src/sgml/plpgsql.sgml
doc/src/sgml/postgres-fdw.sgml
doc/src/sgml/queries.sgml
doc/src/sgml/ref/abort.sgml
doc/src/sgml/ref/alter_aggregate.sgml
doc/src/sgml/ref/alter_domain.sgml
doc/src/sgml/ref/alter_foreign_table.sgml
doc/src/sgml/ref/alter_group.sgml
doc/src/sgml/ref/alter_index.sgml
doc/src/sgml/ref/alter_materialized_view.sgml
doc/src/sgml/ref/alter_role.sgml
doc/src/sgml/ref/alter_statistics.sgml
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/alter_trigger.sgml
doc/src/sgml/ref/alter_type.sgml
doc/src/sgml/ref/alter_user.sgml
doc/src/sgml/ref/analyze.sgml
doc/src/sgml/ref/begin.sgml
doc/src/sgml/ref/close.sgml
doc/src/sgml/ref/cluster.sgml
doc/src/sgml/ref/copy.sgml
doc/src/sgml/ref/create_aggregate.sgml
doc/src/sgml/ref/create_cast.sgml
doc/src/sgml/ref/create_database.sgml
doc/src/sgml/ref/create_foreign_table.sgml
doc/src/sgml/ref/create_function.sgml
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/ref/create_language.sgml
doc/src/sgml/ref/create_materialized_view.sgml
doc/src/sgml/ref/create_operator.sgml
doc/src/sgml/ref/create_procedure.sgml
doc/src/sgml/ref/create_role.sgml
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_table_as.sgml
doc/src/sgml/ref/create_transform.sgml
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/ref/create_type.sgml
doc/src/sgml/ref/create_user.sgml
doc/src/sgml/ref/create_view.sgml
doc/src/sgml/ref/createdb.sgml
doc/src/sgml/ref/createuser.sgml
doc/src/sgml/ref/declare.sgml
doc/src/sgml/ref/delete.sgml
doc/src/sgml/ref/drop_group.sgml
doc/src/sgml/ref/drop_language.sgml
doc/src/sgml/ref/drop_owned.sgml
doc/src/sgml/ref/drop_role.sgml
doc/src/sgml/ref/drop_table.sgml
doc/src/sgml/ref/drop_user.sgml
doc/src/sgml/ref/dropdb.sgml
doc/src/sgml/ref/dropuser.sgml
doc/src/sgml/ref/end.sgml
doc/src/sgml/ref/explain.sgml
doc/src/sgml/ref/fetch.sgml
doc/src/sgml/ref/grant.sgml
doc/src/sgml/ref/lock.sgml
doc/src/sgml/ref/postgres-ref.sgml
doc/src/sgml/ref/prepare.sgml
doc/src/sgml/ref/prepare_transaction.sgml
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/reassign_owned.sgml
doc/src/sgml/ref/refresh_materialized_view.sgml
doc/src/sgml/ref/reindexdb.sgml
doc/src/sgml/ref/revoke.sgml
doc/src/sgml/ref/rollback.sgml
doc/src/sgml/ref/rollback_to.sgml
doc/src/sgml/ref/savepoint.sgml
doc/src/sgml/ref/select.sgml
doc/src/sgml/ref/select_into.sgml
doc/src/sgml/ref/set_role.sgml
doc/src/sgml/ref/set_session_auth.sgml
doc/src/sgml/ref/start_transaction.sgml
doc/src/sgml/ref/vacuumdb.sgml
doc/src/sgml/sepgsql.sgml
doc/src/sgml/tsm-system-rows.sgml
doc/src/sgml/tsm-system-time.sgml
doc/src/sgml/user-manag.sgml
doc/src/sgml/xaggr.sgml
doc/src/sgml/xfunc.sgml
doc/src/sgml/xplang.sgml

index b9331830f7d0a2366e73444432a11c13af3ca365..42a8ed328d88694e89e4b1ec26792e9d4385be17 100644 (file)
@@ -177,8 +177,8 @@ pg_dump -h <replaceable>host1</replaceable> <replaceable>dbname</replaceable> |
    </important>
 
    <para>
-    After restoring a backup, it is wise to run <xref
-    linkend="sql-analyze"/> on each
+    After restoring a backup, it is wise to run <link
+    linkend="sql-analyze"><command>ANALYZE</command></link> on each
     database so the query optimizer has useful statistics;
     see <xref linkend="vacuum-for-statistics"/>
     and <xref linkend="autovacuum"/> for more information.
@@ -1594,7 +1594,7 @@ archive_command = 'local_backup_script.sh "%p" "%f"'
   <itemizedlist>
    <listitem>
     <para>
-     If a <xref linkend="sql-createdatabase"/>
+     If a <link linkend="sql-createdatabase"><command>CREATE DATABASE</command></link>
      command is executed while a base backup is being taken, and then
      the template database that the <command>CREATE DATABASE</command> copied
      is modified while the base backup is still in progress, it is
@@ -1607,7 +1607,7 @@ archive_command = 'local_backup_script.sh "%p" "%f"'
 
    <listitem>
     <para>
-     <xref linkend="sql-createtablespace"/>
+     <link linkend="sql-createtablespace"><command>CREATE TABLESPACE</command></link>
      commands are WAL-logged with the literal absolute path, and will
      therefore be replayed as tablespace creations with the same
      absolute path.  This might be undesirable if the log is being
index de9bacd34f8dd7d18cc015c5383dca8879136867..0e580b157f5355d67f0ca045804b9cfa4c6fb4f9 100644 (file)
   </table>
 
   <para>
-   New aggregate functions are registered with the <xref
-   linkend="sql-createaggregate"/>
+   New aggregate functions are registered with the <link
+   linkend="sql-createaggregate"><command>CREATE AGGREGATE</command></link>
    command.  See <xref linkend="xaggr"/> for more information about
    writing aggregate functions and the meaning of the transition
    functions, etc.
       <para>
        <structfield>attstattarget</structfield> controls the level of detail
        of statistics accumulated for this column by
-       <xref linkend="sql-analyze"/>.
+       <link linkend="sql-analyze"><command>ANALYZE</command></link>.
        A zero value indicates that no statistics should be collected.
        A negative value says to use the system default statistics target.
        The exact meaning of positive values is data type-dependent.
@@ -1966,9 +1966,9 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
       <para>
        Size of the on-disk representation of this table in pages (of size
        <symbol>BLCKSZ</symbol>).  This is only an estimate used by the
-       planner.  It is updated by <xref linkend="sql-vacuum"/>,
-       <xref linkend="sql-analyze"/>, and a few DDL commands such as
-       <xref linkend="sql-createindex"/>.
+       planner.  It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>,
+       <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as
+       <link linkend="sql-createindex"><command>CREATE INDEX</command></link>.
       </para></entry>
      </row>
 
@@ -1978,9 +1978,9 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
       </para>
       <para>
        Number of live rows in the table.  This is only an estimate used by
-       the planner.  It is updated by <xref linkend="sql-vacuum"/>,
-       <xref linkend="sql-analyze"/>, and a few DDL commands such as
-       <xref linkend="sql-createindex"/>.
+       the planner.  It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>,
+       <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as
+       <link linkend="sql-createindex"><command>CREATE INDEX</command></link>.
        If the table has never yet been vacuumed or
        analyzed, <structfield>reltuples</structfield>
        contains <literal>-1</literal> indicating that the row count is
@@ -1995,9 +1995,9 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
       <para>
        Number of pages that are marked all-visible in the table's
        visibility map.  This is only an estimate used by the
-       planner.  It is updated by <xref linkend="sql-vacuum"/>,
-       <xref linkend="sql-analyze"/>, and a few DDL commands such as
-       <xref linkend="sql-createindex"/>.
+       planner.  It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>,
+       <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as
+       <link linkend="sql-createindex"><command>CREATE INDEX</command></link>.
       </para></entry>
      </row>
 
@@ -2241,8 +2241,8 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
    lazily: they are guaranteed to be true if that's the correct state, but
    may not be reset to false immediately when the condition is no longer
    true.  For example, <structfield>relhasindex</structfield> is set by
-   <xref linkend="sql-createindex"/>, but it is never cleared by
-   <xref linkend="sql-dropindex"/>.  Instead, <xref linkend="sql-vacuum"/> clears
+   <link linkend="sql-createindex"><command>CREATE INDEX</command></link>, but it is never cleared by
+   <link linkend="sql-dropindex"><command>DROP INDEX</command></link>.  Instead, <link linkend="sql-vacuum"><command>VACUUM</command></link> clears
    <structfield>relhasindex</structfield> if it finds the table has no indexes.  This
    arrangement avoids race conditions and improves concurrency.
   </para>
@@ -2848,8 +2848,8 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
   <para>
    The catalog <structname>pg_database</structname> stores information about
-   the available databases.  Databases are created with the <xref
-   linkend="sql-createdatabase"/> command.
+   the available databases.  Databases are created with the <link
+   linkend="sql-createdatabase"><command>CREATE DATABASE</command></link> command.
    Consult <xref linkend="managing-databases"/> for details about the meaning
    of some of the parameters.
   </para>
@@ -3425,7 +3425,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
        the referenced object (see
        <link linkend="catalog-pg-extension"><structname>pg_extension</structname></link>).
        The dependent object can be dropped only via
-       <xref linkend="sql-dropextension"/> on the referenced object.
+       <link linkend="sql-dropextension"><command>DROP EXTENSION</command></link> on the referenced object.
        Functionally this dependency type acts the same as
        an <literal>INTERNAL</literal> dependency, but it's kept separate for
        clarity and to simplify <application>pg_dump</application>.
@@ -3492,7 +3492,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   <para>
    The catalog <structname>pg_description</structname> stores optional descriptions
    (comments) for each database object.  Descriptions can be manipulated
-   with the <xref linkend="sql-comment"/> command and viewed with
+   with the <link linkend="sql-comment"><command>COMMENT</command></link> command and viewed with
    <application>psql</application>'s <literal>\d</literal> commands.
    Descriptions of many built-in system objects are provided in the initial
    contents of <structname>pg_description</structname>.
@@ -4285,7 +4285,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
       <para>
        If true, the index is currently valid for queries.  False means the
        index is possibly incomplete: it must still be modified by
-       <xref linkend="sql-insert"/>/<xref linkend="sql-update"/> operations, but it cannot safely
+       <link linkend="sql-insert"><command>INSERT</command></link>/<link linkend="sql-update"><command>UPDATE</command></link> operations, but it cannot safely
        be used for queries. If it is unique, the uniqueness property is not
        guaranteed true either.
       </para></entry>
@@ -4309,7 +4309,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
       </para>
       <para>
        If true, the index is currently ready for inserts.  False means the
-       index must be ignored by <xref linkend="sql-insert"/>/<xref linkend="sql-update"/>
+       index must be ignored by <link linkend="sql-insert"><command>INSERT</command></link>/<link linkend="sql-update"><command>UPDATE</command></link>
        operations.
       </para></entry>
      </row>
@@ -4504,11 +4504,11 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   <para>
    Objects can have initial privileges either by having those privileges set
    when the system is initialized (by <application>initdb</application>) or when the
-   object is created during a <xref linkend="sql-createextension"/> and the
-   extension script sets initial privileges using the <xref linkend="sql-grant"/>
+   object is created during a <link linkend="sql-createextension"><command>CREATE EXTENSION</command></link> and the
+   extension script sets initial privileges using the <link linkend="sql-grant"><command>GRANT</command></link>
    system.  Note that the system will automatically handle recording of the
    privileges during the extension script and that extension authors need
-   only use the <xref linkend="sql-grant"/> and <xref linkend="sql-revoke"/>
+   only use the <command>GRANT</command> and <command>REVOKE</command>
    statements in their script to have the privileges recorded.  The
    <literal>privtype</literal> column indicates if the initial privilege was
    set by <application>initdb</application> or during a
@@ -6481,7 +6481,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   <para>
    The catalog <structname>pg_seclabel</structname> stores security
    labels on database objects.  Security labels can be manipulated
-   with the <xref linkend="sql-security-label"/> command.  For an easier
+   with the <link linkend="sql-security-label"><command>SECURITY LABEL</command></link> command.  For an easier
    way to view security labels, see <xref linkend="view-pg-seclabels"/>.
   </para>
 
@@ -6855,7 +6855,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   <para>
    The catalog <structname>pg_shdescription</structname> stores optional
    descriptions (comments) for shared database objects.  Descriptions can be
-   manipulated with the <xref linkend="sql-comment"/> command and viewed with
+   manipulated with the <link linkend="sql-comment"><command>COMMENT</command></link> command and viewed with
    <application>psql</application>'s <literal>\d</literal> commands.
   </para>
 
@@ -6931,7 +6931,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   <para>
    The catalog <structname>pg_shseclabel</structname> stores security
    labels on shared database objects.  Security labels can be manipulated
-   with the <xref linkend="sql-security-label"/> command.  For an easier
+   with the <link linkend="sql-security-label"><command>SECURITY LABEL</command></link> command.  For an easier
    way to view security labels, see <xref linkend="view-pg-seclabels"/>.
   </para>
 
@@ -7015,7 +7015,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   <para>
    The catalog <structname>pg_statistic</structname> stores
    statistical data about the contents of the database.  Entries are
-   created by <xref linkend="sql-analyze"/>
+   created by <link linkend="sql-analyze"><command>ANALYZE</command></link>
    and subsequently used by the query planner.  Note that all the
    statistical data is inherently approximate, even assuming that it
    is up-to-date.
@@ -7223,7 +7223,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
    The catalog <structname>pg_statistic_ext</structname>
    holds definitions of extended planner statistics.
    Each row in this catalog corresponds to a <firstterm>statistics object</firstterm>
-   created with <xref linkend="sql-createstatistics"/>.
+   created with <link linkend="sql-createstatistics"><command>CREATE STATISTICS</command></link>.
   </para>
 
   <table>
@@ -7296,7 +7296,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
       <para>
        <structfield>stxstattarget</structfield> controls the level of detail
        of statistics accumulated for this statistics object by
-       <xref linkend="sql-analyze"/>.
+       <link linkend="sql-analyze"><command>ANALYZE</command></link>.
        A zero value indicates that no statistics should be collected.
        A negative value says to use the maximum of the statistics targets of
        the referenced columns, if set, or the system default statistics target.
@@ -7337,9 +7337,9 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
   <para>
    The <structname>pg_statistic_ext</structname> entry is filled in
-   completely during <xref linkend="sql-createstatistics"/>, but the actual
+   completely during <link linkend="sql-createstatistics"><command>CREATE STATISTICS</command></link>, but the actual
    statistical values are not computed then.
-   Subsequent <xref linkend="sql-analyze"/> commands compute the desired values
+   Subsequent <link linkend="sql-analyze"><command>ANALYZE</command></link> commands compute the desired values
    and populate an entry in the
    <link linkend="catalog-pg-statistic-ext-data"><structname>pg_statistic_ext_data</structname></link>
    catalog.
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
    holds data for extended planner statistics defined in
    <link linkend="catalog-pg-statistic-ext"><structname>pg_statistic_ext</structname></link>.
    Each row in this catalog corresponds to a <firstterm>statistics object</firstterm>
-   created with <xref linkend="sql-createstatistics"/>.
+   created with <link linkend="sql-createstatistics"><command>CREATE STATISTICS</command></link>.
   </para>
 
   <para>
@@ -7591,7 +7591,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
   <para>
    This catalog only contains tables known to the subscription after running
-   either <xref linkend="sql-createsubscription"/> or
+   either <link linkend="sql-createsubscription"><command>CREATE SUBSCRIPTION</command></link> or
    <link linkend="sql-altersubscription"><command>ALTER SUBSCRIPTION ... REFRESH
    PUBLICATION</command></link>.
   </para>
@@ -8569,9 +8569,9 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   <para>
    The catalog <structname>pg_type</structname> stores information about data
    types.  Base types and enum types (scalar types) are created with
-   <xref linkend="sql-createtype"/>, and
+   <link linkend="sql-createtype"><command>CREATE TYPE</command></link>, and
    domains with
-   <xref linkend="sql-createdomain"/>.
+   <link linkend="sql-createdomain"><command>CREATE DOMAIN</command></link>.
    A composite type is automatically created for each table in the database, to
    represent the row structure of the table.  It is also possible to create
    composite types with <command>CREATE TYPE AS</command>.
@@ -9791,7 +9791,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
    <itemizedlist>
     <listitem>
      <para>
-      via the <xref linkend="sql-declare"/>
+      via the <link linkend="sql-declare"><command>DECLARE</command></link>
       statement in SQL
      </para>
     </listitem>
@@ -10917,7 +10917,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
    <structname>pg_prepared_statements</structname> contains one row
    for each prepared statement. Rows are added to the view when a new
    prepared statement is created and removed when a prepared statement
-   is released (for example, via the <xref linkend="sql-deallocate"/> command).
+   is released (for example, via the <link linkend="sql-deallocate"><command>DEALLOCATE</command></link> command).
   </para>
 
   <table>
@@ -10951,7 +10951,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
       <para>
        The query string submitted by the client to create this
        prepared statement. For prepared statements created via SQL,
-       this is the <xref linkend="sql-prepare"/> statement submitted by
+       this is the <command>PREPARE</command> statement submitted by
        the client. For prepared statements created via the
        frontend/backend protocol, this is the text of the prepared
        statement itself.
@@ -10985,7 +10985,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
       </para>
       <para>
        <literal>true</literal> if the prepared statement was created
-       via the <xref linkend="sql-prepare"/> SQL command;
+       via the <command>PREPARE</command> SQL command;
        <literal>false</literal> if the statement was prepared via the
        frontend/backend protocol
       </para></entry>
@@ -11967,10 +11967,10 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   <para>
    The view <structname>pg_settings</structname> provides access to
    run-time parameters of the server.  It is essentially an alternative
-   interface to the <xref linkend="sql-show"/>
-   and <xref linkend="sql-set"/> commands.
+   interface to the <link linkend="sql-show"><command>SHOW</command></link>
+   and <link linkend="sql-set"><command>SET</command></link> commands.
    It also provides access to some facts about each parameter that are
-   not directly available from <command>SHOW</command>, such as minimum and
+   not directly available from <link linkend="sql-show"><command>SHOW</command></link>, such as minimum and
    maximum values.
   </para>
 
@@ -12116,7 +12116,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
        <structfield>reset_val</structfield> <type>text</type>
       </para>
       <para>
-       Value that <xref linkend="sql-reset"/> would reset the parameter to
+       Value that <link linkend="sql-reset"><command>RESET</command></link> would reset the parameter to
        in the current session
       </para></entry>
      </row>
@@ -12249,7 +12249,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
     <listitem>
      <para>
       These settings can be set from <filename>postgresql.conf</filename>,
-      or within a session via the <xref linkend="sql-set"/> command; but only superusers
+      or within a session via the <command>SET</command> command; but only superusers
       can change them via <command>SET</command>.  Changes in
       <filename>postgresql.conf</filename> will affect existing sessions
       only if no session-local value has been established with <command>SET</command>.
@@ -12262,7 +12262,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
     <listitem>
      <para>
       These settings can be set from <filename>postgresql.conf</filename>,
-      or within a session via the <xref linkend="sql-set"/> command.  Any user is
+      or within a session via the <command>SET</command> command.  Any user is
       allowed to change their session-local value.  Changes in
       <filename>postgresql.conf</filename> will affect existing sessions
       only if no session-local value has been established with <command>SET</command>.
@@ -12278,9 +12278,9 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
   <para>
    The <structname>pg_settings</structname> view cannot be inserted into or
-   deleted from, but it can be updated.  An <xref linkend="sql-update"/> applied
+   deleted from, but it can be updated.  An <command>UPDATE</command> applied
    to a row of <structname>pg_settings</structname> is equivalent to executing
-   the <xref linkend="sql-set"/> command on that named
+   the <command>SET</command> command on that named
    parameter. The change only affects the value used by the current
    session. If an <command>UPDATE</command> is issued within a transaction
    that is later aborted, the effects of the <command>UPDATE</command> command
@@ -12622,7 +12622,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
        If greater than zero, the estimated number of distinct values in the
        column.  If less than zero, the negative of the number of distinct
        values divided by the number of rows.  (The negated form is used when
-       <xref linkend="sql-analyze"/> believes that the number of distinct values is
+       <command>ANALYZE</command> believes that the number of distinct values is
        likely to increase as the table grows; the positive form is used when
        the column seems to have a fixed number of possible values.)  For
        example, -1 indicates a unique column in which the number of distinct
@@ -12846,7 +12846,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
        than zero, the estimated number of distinct values in the combination.
        If less than zero, the negative of the number of distinct values divided
        by the number of rows.
-       (The negated form is used when <xref linkend="sql-analyze"/> believes that
+       (The negated form is used when <command>ANALYZE</command> believes that
        the number of distinct values is likely to increase as the table grows;
        the positive form is used when the column seems to have a fixed number
        of possible values.)  For example, -1 indicates a unique combination of
index 06405f359cdfe163b9e7ce2acb2db544be2e63c1..ee914740cc4be3793bb4a9ec672b50d898bcd3b0 100644 (file)
@@ -189,7 +189,7 @@ shared_buffers = 128MB
      <filename>postgresql.auto.conf</filename><indexterm><primary>postgresql.auto.conf</primary></indexterm>,
      which has the same format as <filename>postgresql.conf</filename> but
      is intended to be edited automatically, not manually.  This file holds
-     settings provided through the <xref linkend="sql-altersystem"/> command.
+     settings provided through the <link linkend="sql-altersystem"><command>ALTER SYSTEM</command></link> command.
      This file is read whenever <filename>postgresql.conf</filename> is,
      and its settings take effect in the same way.  Settings
      in <filename>postgresql.auto.conf</filename> override those
@@ -221,7 +221,7 @@ shared_buffers = 128MB
      <para>
       <productname>PostgreSQL</productname> provides three SQL
       commands to establish configuration defaults.
-      The already-mentioned <xref linkend="sql-altersystem"/> command
+      The already-mentioned <command>ALTER SYSTEM</command> command
       provides a SQL-accessible means of changing global defaults; it is
       functionally equivalent to editing <filename>postgresql.conf</filename>.
       In addition, there are two commands that allow setting of defaults
@@ -231,14 +231,14 @@ shared_buffers = 128MB
      <itemizedlist>
      <listitem>
       <para>
-       The <xref linkend="sql-alterdatabase"/> command allows global
+       The <link linkend="sql-alterdatabase"><command>ALTER DATABASE</command></link> command allows global
        settings to be overridden on a per-database basis.
       </para>
      </listitem>
 
      <listitem>
       <para>
-       The <xref linkend="sql-alterrole"/> command allows both global and
+       The <link linkend="sql-alterrole"><command>ALTER ROLE</command></link> command allows both global and
        per-database settings to be overridden with user-specific values.
       </para>
      </listitem>
@@ -262,7 +262,7 @@ shared_buffers = 128MB
     <itemizedlist>
      <listitem>
      <para>
-      The <xref linkend="sql-show"/> command allows inspection of the
+      The <link linkend="sql-show"><command>SHOW</command></link> command allows inspection of the
       current value of all parameters.  The corresponding function is
       <function>current_setting(setting_name text)</function>.
      </para>
@@ -270,7 +270,7 @@ shared_buffers = 128MB
 
      <listitem>
       <para>
-       The <xref linkend="sql-set"/> command allows modification of the
+       The <link linkend="sql-set"><command>SET</command></link> command allows modification of the
        current value of those parameters that can be set locally to a
        session; it has no effect on other sessions.
        The corresponding function is
@@ -296,7 +296,7 @@ shared_buffers = 128MB
 
      <listitem>
       <para>
-       Using <xref linkend="sql-update"/> on this view, specifically
+       Using <command>UPDATE</command> on this view, specifically
        updating the <structname>setting</structname> column, is the equivalent
        of issuing <command>SET</command> commands.  For example, the equivalent of
 <programlisting>
@@ -4608,7 +4608,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
        Better ways to improve the quality of the
        plans chosen by the optimizer include adjusting the planner cost
        constants (see <xref linkend="runtime-config-query-constants"/>),
-       running <xref linkend="sql-analyze"/> manually, increasing
+       running <link linkend="sql-analyze"><command>ANALYZE</command></link> manually, increasing
        the value of the <xref
        linkend="guc-default-statistics-target"/> configuration parameter,
        and increasing the amount of statistics collected for
@@ -8095,7 +8095,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
         set it to <literal>replica</literal> when they are applying replicated
         changes.  The effect of that will be that triggers and rules (that
         have not been altered from their default configuration) will not fire
-        on the replica.  See the <xref linkend="sql-altertable"/> clauses
+        on the replica.  See the <link linkend="sql-altertable"><command>ALTER TABLE</command></link> clauses
         <literal>ENABLE TRIGGER</literal> and <literal>ENABLE RULE</literal>
         for more information.
        </para>
@@ -8781,7 +8781,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
         This variable specifies one or more shared libraries that are to be
         preloaded at connection start.
         It contains a comma-separated list of library names, where each name
-        is interpreted as for the <xref linkend="sql-load"/> command.
+        is interpreted as for the <link linkend="sql-load"><command>LOAD</command></link> command.
         Whitespace between entries is ignored; surround a library name with
         double quotes if you need to include whitespace or commas in the name.
         The parameter value only takes effect at the start of the connection.
@@ -8832,7 +8832,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
         This variable specifies one or more shared libraries that are to be
         preloaded at connection start.
         It contains a comma-separated list of library names, where each name
-        is interpreted as for the <xref linkend="sql-load"/> command.
+        is interpreted as for the <link linkend="sql-load"><command>LOAD</command></link> command.
         Whitespace between entries is ignored; surround a library name with
         double quotes if you need to include whitespace or commas in the name.
         The parameter value only takes effect at the start of the connection.
@@ -8874,7 +8874,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
         This variable specifies one or more shared libraries to be preloaded at
         server start.
         It contains a comma-separated list of library names, where each name
-        is interpreted as for the <xref linkend="sql-load"/> command.
+        is interpreted as for the <link linkend="sql-load"><command>LOAD</command></link> command.
         Whitespace between entries is ignored; surround a library name with
         double quotes if you need to include whitespace or commas in the name.
         This parameter can only be set at server start.  If a specified
index 9fb2be6674f9543a30de74c635c2dada9cba3105..c4897d68c9b9eb93e7759b06cf23d8161954e5d5 100644 (file)
@@ -1675,12 +1675,12 @@ REVOKE ALL ON accounts FROM PUBLIC;
      <term><literal>SELECT</literal></term>
      <listitem>
       <para>
-       Allows <xref linkend="sql-select"/> from
+       Allows <command>SELECT</command> from
        any column, or specific column(s), of a table, view, materialized
        view, or other table-like object.
-       Also allows use of <xref linkend="sql-copy"/> TO.
+       Also allows use of <command>COPY TO</command>.
        This privilege is also needed to reference existing column values in
-       <xref linkend="sql-update"/> or <xref linkend="sql-delete"/>.
+       <command>UPDATE</command> or <command>DELETE</command>.
        For sequences, this privilege also allows use of the
        <function>currval</function> function.
        For large objects, this privilege allows the object to be read.
@@ -1692,11 +1692,11 @@ REVOKE ALL ON accounts FROM PUBLIC;
      <term><literal>INSERT</literal></term>
      <listitem>
       <para>
-       Allows <xref linkend="sql-insert"/> of a new row into a table, view,
+       Allows <command>INSERT</command> of a new row into a table, view,
        etc.  Can be granted on specific column(s), in which case
        only those columns may be assigned to in the <command>INSERT</command>
        command (other columns will therefore receive default values).
-       Also allows use of <xref linkend="sql-copy"/> FROM.
+       Also allows use of <command>COPY FROM</command>.
       </para>
      </listitem>
     </varlistentry>
@@ -1705,7 +1705,7 @@ REVOKE ALL ON accounts FROM PUBLIC;
      <term><literal>UPDATE</literal></term>
      <listitem>
       <para>
-       Allows <xref linkend="sql-update"/> of any
+       Allows <command>UPDATE</command> of any
        column, or specific column(s), of a table, view, etc.
        (In practice, any nontrivial <command>UPDATE</command> command will
        require <literal>SELECT</literal> privilege as well, since it must
@@ -1727,7 +1727,7 @@ REVOKE ALL ON accounts FROM PUBLIC;
      <term><literal>DELETE</literal></term>
      <listitem>
       <para>
-       Allows <xref linkend="sql-delete"/> of a row from a table, view, etc.
+       Allows <command>DELETE</command> of a row from a table, view, etc.
        (In practice, any nontrivial <command>DELETE</command> command will
        require <literal>SELECT</literal> privilege as well, since it must
        reference table columns to determine which rows to delete.)
@@ -1739,7 +1739,7 @@ REVOKE ALL ON accounts FROM PUBLIC;
      <term><literal>TRUNCATE</literal></term>
      <listitem>
       <para>
-       Allows <xref linkend="sql-truncate"/> on a table, view, etc.
+       Allows <command>TRUNCATE</command> on a table, view, etc.
       </para>
      </listitem>
     </varlistentry>
@@ -3370,11 +3370,11 @@ VALUES ('Albany', NULL, NULL, 'NY');
   <para>
    Table inheritance is typically established when the child table is
    created, using the <literal>INHERITS</literal> clause of the
-   <xref linkend="sql-createtable"/>
+   <link linkend="sql-createtable"><command>CREATE TABLE</command></link>
    statement.
    Alternatively, a table which is already defined in a compatible way can
    have a new parent relationship added, using the <literal>INHERIT</literal>
-   variant of <xref linkend="sql-altertable"/>.
+   variant of <link linkend="sql-altertable"><command>ALTER TABLE</command></link>.
    To do this the new child table must already include columns with
    the same names and types as the columns of the parent. It must also include
    check constraints with the same names and check expressions as those of the
@@ -3406,7 +3406,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
   </para>
 
   <para>
-   <xref linkend="sql-altertable"/> will
+   <command>ALTER TABLE</command> will
    propagate any changes in column data definitions and check
    constraints down the inheritance hierarchy.  Again, dropping
    columns that are depended on by other tables is only possible when using
index 3844e34a7dcceaeed9ef18f167437fe62966cf2e..971e6a36b5159879822cf1ff827bc83194b7bbab 100644 (file)
@@ -245,7 +245,7 @@ UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a &gt; 0;
   <para>
    You use the <xref linkend="sql-delete"/>
    command to remove rows; the syntax is very similar to the
-   <command>UPDATE</command> command.  For instance, to remove all
+   <xref linkend="sql-update"/> command.  For instance, to remove all
    rows from the products table that have a price of 10, use:
 <programlisting>
 DELETE FROM products WHERE price = 10;
index 7266e229a47d8c92b85808b3ba35e2fbf246e194..6e3ca788f6ecdf6eda1cc949ead227cf75a574e6 100644 (file)
@@ -479,10 +479,9 @@ EXEC SQL COMMIT;
   </para>
 
   <para>
-   For more details about declaration of the cursor,
-   see <xref linkend="ecpg-sql-declare"/>, and
-   see <xref linkend="sql-fetch"/> for <literal>FETCH</literal> command
-   details.
+   For more details about declaring a cursor, see <xref
+   linkend="ecpg-sql-declare"/>; for more details about fetching rows from a
+   cursor, see <xref linkend="sql-fetch"/>.
   </para>
 
    <note>
index e486006224cc5ed37fce42b99b0c8760f145a1b1..1c37026bb0508dab3d95675fc5282fe77a4c2901 100644 (file)
@@ -504,7 +504,7 @@ RETURNS anycompatible AS ...
     of the extension itself.  If the extension includes C code, there
     will typically also be a shared library file into which the C code
     has been built.  Once you have these files, a simple
-    <xref linkend="sql-createextension"/> command loads the objects into
+    <link linkend="sql-createextension"><command>CREATE EXTENSION</command></link> command loads the objects into
     your database.
    </para>
 
@@ -513,7 +513,7 @@ RETURNS anycompatible AS ...
     <acronym>SQL</acronym> script to load a bunch of <quote>loose</quote> objects
     into your database, is that <productname>PostgreSQL</productname> will then
     understand that the objects of the extension go together.  You can
-    drop all the objects with a single <xref linkend="sql-dropextension"/>
+    drop all the objects with a single <link linkend="sql-dropextension"><command>DROP EXTENSION</command></link>
     command (no need to maintain a separate <quote>uninstall</quote> script).
     Even more useful, <application>pg_dump</application> knows that it should not
     dump the individual member objects of the extension &mdash; it will
@@ -572,7 +572,7 @@ RETURNS anycompatible AS ...
 
    <para>
     The kinds of SQL objects that can be members of an extension are shown in
-    the description of <xref linkend="sql-alterextension"/>.  Notably, objects
+    the description of <link linkend="sql-alterextension"><command>ALTER EXTENSION</command></link>.  Notably, objects
     that are database-cluster-wide, such as databases, roles, and tablespaces,
     cannot be extension members since an extension is only known within one
     database.  (Although an extension script is not prohibited from creating
@@ -605,7 +605,7 @@ RETURNS anycompatible AS ...
    </indexterm>
 
     <para>
-     The <xref linkend="sql-createextension"/> command relies on a control
+     The <command>CREATE EXTENSION</command> command relies on a control
      file for each extension, which must be named the same as the extension
      with a suffix of <literal>.control</literal>, and must be placed in the
      installation's <literal>SHAREDIR/extension</literal> directory.  There
@@ -1373,7 +1373,7 @@ include $(PGXS)
 
     <para>
      Once the files are installed, use the
-     <xref linkend="sql-createextension"/> command to load the objects into
+     <command>CREATE EXTENSION</command> command to load the objects into
      any particular database.
     </para>
    </sect2>
index 87eac7be5897236700a5ce23f873c202dda9c6c5..a560ad69b44bb6b7f8b7bd533a035e1a41f3ba70 100644 (file)
   </para>
 
   <para>
-   A publication is created using the <xref linkend="sql-createpublication"/>
+   A publication is created using the <link linkend="sql-createpublication"><command>CREATE PUBLICATION</command></link>
    command and may later be altered or dropped using corresponding commands.
   </para>
 
   <para>
    The individual tables can be added and removed dynamically using
-   <xref linkend="sql-alterpublication"/>.  Both the <literal>ADD
+   <link linkend="sql-alterpublication"><command>ALTER PUBLICATION</command></link>.  Both the <literal>ADD
    TABLE</literal> and <literal>DROP TABLE</literal> operations are
    transactional; so the table will start or stop replicating at the correct
    snapshot once the transaction has committed.
   </para>
 
   <para>
-   The subscription is added using <xref linkend="sql-createsubscription"/> and
+   The subscription is added using <link linkend="sql-createsubscription"><command>CREATE SUBSCRIPTION</command></link> and
    can be stopped/resumed at any time using the
-   <xref linkend="sql-altersubscription"/> command and removed using
-   <xref linkend="sql-dropsubscription"/>.
+   <link linkend="sql-altersubscription"><command>ALTER SUBSCRIPTION</command></link> command and removed using
+   <link linkend="sql-dropsubscription"><command>DROP SUBSCRIPTION</command></link>.
   </para>
 
   <para>
      tables.)  Publications can also specify that changes are to be replicated
      using the identity and schema of the partitioned root table instead of
      that of the individual leaf partitions in which the changes actually
-     originate (see <xref linkend="sql-createpublication"/>).
+     originate (see <link linkend="sql-createpublication"><command>CREATE PUBLICATION</command></link>).
     </para>
    </listitem>
   </itemizedlist>
index de0794adeb90bf6842375421c646279508334eef..4d8ad754f8577ab74eb7d2ef9f258a423bca80ef 100644 (file)
@@ -87,7 +87,7 @@
 
    <para>
     <productname>PostgreSQL</productname>'s
-    <xref linkend="sql-vacuum"/> command has to
+    <link linkend="sql-vacuum"><command>VACUUM</command></link> command has to
     process each table on a regular basis for several reasons:
 
     <orderedlist>
     massive update or delete activity.  If you have such a table and
     you need to reclaim the excess disk space it occupies, you will need
     to use <command>VACUUM FULL</command>, or alternatively
-    <xref linkend="sql-cluster"/>
+    <link linkend="sql-cluster"><command>CLUSTER</command></link>
     or one of the table-rewriting variants of
-    <xref linkend="sql-altertable"/>.
+    <link linkend="sql-altertable"><command>ALTER TABLE</command></link>.
     These commands rewrite an entire new copy of the table and build
     new indexes for it.  All these options require exclusive lock.  Note that
     they also temporarily use extra disk space approximately equal to the size
    <para>
     If you have a table whose entire contents are deleted on a periodic
     basis, consider doing it with
-    <xref linkend="sql-truncate"/> rather
+    <link linkend="sql-truncate"><command>TRUNCATE</command></link> rather
     than using <command>DELETE</command> followed by
     <command>VACUUM</command>. <command>TRUNCATE</command> removes the
     entire content of the table immediately, without requiring a
     The <productname>PostgreSQL</productname> query planner relies on
     statistical information about the contents of tables in order to
     generate good plans for queries.  These statistics are gathered by
-    the <xref linkend="sql-analyze"/> command,
+    the <link linkend="sql-analyze"><command>ANALYZE</command></link> command,
     which can be invoked by itself or
     as an optional step in <command>VACUUM</command>.  It is important to have
     reasonably accurate statistics, otherwise poor choices of plans might
index 495018009a2a3eab9f037fdd9b4392457b2e7ac6..171ba7049c7bdb60a54c8839fd2025f30b570f6d 100644 (file)
@@ -27,7 +27,7 @@
    <command>ps</command>, <command>top</command>, <command>iostat</command>, and <command>vmstat</command>.
    Also, once one has identified a
    poorly-performing query, further investigation might be needed using
-   <productname>PostgreSQL</productname>'s <xref linkend="sql-explain"/> command.
+   <productname>PostgreSQL</productname>'s <link linkend="sql-explain"><command>EXPLAIN</command></link> command.
    <xref linkend="using-explain"/> discusses <command>EXPLAIN</command>
    and other methods for understanding the behavior of an individual
    query.
@@ -5278,8 +5278,8 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
   <note>
    <para>
     Note that when <command>ANALYZE</command> is run on a partitioned table,
-    all of its partitions are also recursively analyzed as also mentioned in
-    <xref linkend="sql-analyze"/>.  In that case, <command>ANALYZE</command>
+    all of its partitions are also recursively analyzed.
+    In that case, <command>ANALYZE</command>
     progress is reported first for the parent table, whereby its inheritance
     statistics are collected, followed by that for each partition.
    </para>
index 6920913a260f9f44af2bc5547bb9c0923ec066d1..1d406176568df92fe4535fe9805baec9cac040c1 100644 (file)
@@ -950,10 +950,9 @@ ERROR:  could not serialize access due to read/write dependencies among transact
          Acquired by <command>VACUUM</command> (without <option>FULL</option>),
          <command>ANALYZE</command>, <command>CREATE INDEX CONCURRENTLY</command>,
          <command>REINDEX CONCURRENTLY</command>,
-         <command>CREATE STATISTICS</command>, and certain <command>ALTER
-         INDEX</command> and <command>ALTER TABLE</command> variants (for full
-         details see <xref linkend="sql-alterindex"/> and <xref
-         linkend="sql-altertable"/>).
+         <command>CREATE STATISTICS</command>, and certain <link linkend="sql-alterindex"><command>ALTER
+         INDEX</command></link> and <link linkend="sql-altertable"><command>ALTER TABLE</command></link> variants (for full
+         details see the documentation of these commands).
         </para>
        </listitem>
       </varlistentry>
@@ -995,7 +994,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
         <para>
          Acquired by <command>CREATE TRIGGER</command> and some forms of
-         <command>ALTER TABLE</command> (see <xref linkend="sql-altertable"/>).
+         <link linkend="sql-altertable"><command>ALTER TABLE</command></link>.
         </para>
        </listitem>
       </varlistentry>
@@ -1723,8 +1722,8 @@ SELECT pg_advisory_lock(q.id) FROM
    <title>Caveats</title>
 
    <para>
-    Some DDL commands, currently only <xref linkend="sql-truncate"/> and the
-    table-rewriting forms of <xref linkend="sql-altertable"/>, are not
+    Some DDL commands, currently only <link linkend="sql-truncate"><command>TRUNCATE</command></link> and the
+    table-rewriting forms of <link linkend="sql-altertable"><command>ALTER TABLE</command></link>, are not
     MVCC-safe.  This means that after the truncation or rewrite commits, the
     table will appear empty to concurrent transactions, if they are using a
     snapshot taken before the DDL command committed.  This will only be an
index 1cd9f5092db174ea5d2f3f8058e78486e99095d0..117a1f7ff92a696970e3e498689e2f69e7639a53 100644 (file)
@@ -31,7 +31,7 @@
     plan to match the query structure and the properties of the data
     is absolutely critical for good performance, so the system includes
     a complex <firstterm>planner</firstterm> that tries to choose good plans.
-    You can use the <xref linkend="sql-explain"/> command
+    You can use the <link linkend="sql-explain"><command>EXPLAIN</command></link> command
     to see what query plan the planner creates for any query.
     Plan-reading is an art that requires some experience to master,
     but this section attempts to cover the basics.
@@ -1144,7 +1144,7 @@ WHERE tablename = 'road';
 
    <para>
     Statistics objects are created using the
-    <xref linkend="sql-createstatistics"/> command.
+    <link linkend="sql-createstatistics"><command>CREATE STATISTICS</command></link> command.
     Creation of such an object merely creates a catalog entry expressing
     interest in the statistics.  Actual data collection is performed
     by <command>ANALYZE</command> (either a manual command, or background
@@ -1612,7 +1612,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    <title>Use <command>COPY</command></title>
 
    <para>
-    Use <xref linkend="sql-copy"/> to load
+    Use <link linkend="sql-copy"><command>COPY</command></link> to load
     all the rows in one command, instead of using a series of
     <command>INSERT</command> commands.  The <command>COPY</command>
     command is optimized for loading large numbers of rows; it is less
@@ -1623,8 +1623,8 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    </para>
 
    <para>
-    If you cannot use <command>COPY</command>, it might help to use <xref
-    linkend="sql-prepare"/> to create a
+    If you cannot use <command>COPY</command>, it might help to use <link
+    linkend="sql-prepare"><command>PREPARE</command></link> to create a
     prepared <command>INSERT</command> statement, and then use
     <command>EXECUTE</command> as many times as required.  This avoids
     some of the overhead of repeatedly parsing and planning
@@ -1763,7 +1763,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
 
    <para>
     Whenever you have significantly altered the distribution of data
-    within a table, running <xref linkend="sql-analyze"/> is strongly recommended. This
+    within a table, running <link linkend="sql-analyze"><command>ANALYZE</command></link> is strongly recommended. This
     includes bulk loading large amounts of data into the table.  Running
     <command>ANALYZE</command> (or <command>VACUUM ANALYZE</command>)
     ensures that the planner has up-to-date statistics about the
index 815912666dd0834c96bfb0ed91d310e0a2a5ed3e..c2bb3e326851a49ed3dee48f8899196a2934bbb6 100644 (file)
@@ -1299,7 +1299,7 @@ EXECUTE format('SELECT count(*) FROM %I '
     <para>
      The <application>PL/pgSQL</application>
      <command>EXECUTE</command> statement is not related to the
-     <xref linkend="sql-execute"/> SQL
+     <link linkend="sql-execute"><command>EXECUTE</command></link> SQL
      statement supported by the
      <productname>PostgreSQL</productname> server. The server's
      <command>EXECUTE</command> statement cannot be used directly within
index 4efaf35d3c4ecc50b07d6bc1d803bc13d3e317fd..e6fd2143c10563389e3e69cce2a9c83a22c33e49 100644 (file)
@@ -456,14 +456,14 @@ OPTIONS (ADD password_required 'false');
    <para>
     Note that constraints other than <literal>NOT NULL</literal> will never be
     imported from the remote tables.  Although <productname>PostgreSQL</productname>
-    does support <literal>CHECK</literal> constraints on foreign tables, there is no
+    does support check constraints on foreign tables, there is no
     provision for importing them automatically, because of the risk that a
     constraint expression could evaluate differently on the local and remote
-    servers.  Any such inconsistency in the behavior of a <literal>CHECK</literal>
+    servers.  Any such inconsistency in the behavior of a check
     constraint could lead to hard-to-detect errors in query optimization.
-    So if you wish to import <literal>CHECK</literal> constraints, you must do so
+    So if you wish to import check constraints, you must do so
     manually, and you should verify the semantics of each one carefully.
-    For more detail about the treatment of <literal>CHECK</literal> constraints on
+    For more detail about the treatment of check constraints on
     foreign tables, see <xref linkend="sql-createforeigntable"/>.
    </para>
 
@@ -705,7 +705,7 @@ CREATE FOREIGN TABLE foreign_table (
    Column names must match as well, unless you attach <literal>column_name</literal>
    options to the individual columns to show how they are named in the remote
    table.
-   In many cases, use of <xref linkend="sql-importforeignschema"/> is
+   In many cases, use of <link linkend="sql-importforeignschema"><command>IMPORT FOREIGN SCHEMA</command></link> is
    preferable to constructing foreign table definitions manually.
   </para>
  </sect2>
index 0a643ef597058261df979b5765a0a863713cd959..875a4d84de026286b32e456d0d6851afce721905 100644 (file)
@@ -24,7 +24,7 @@
   <para>
    The process of retrieving or the command to retrieve data from a
    database is called a <firstterm>query</firstterm>.  In SQL the
-   <xref linkend="sql-select"/> command is
+   <link linkend="sql-select"><command>SELECT</command></link> command is
    used to specify queries.  The general syntax of the
    <command>SELECT</command> command is
 <synopsis>
index 03729133651671806517b72b332b4de22231e944..16b5602487d7d792d9d9ee173c18c44788775ba5 100644 (file)
@@ -33,7 +33,7 @@ ABORT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
    all the updates made by the transaction to be discarded.
    This command is identical
    in behavior to the standard <acronym>SQL</acronym> command
-   <xref linkend="sql-rollback"/>,
+   <link linkend="sql-rollback"><command>ROLLBACK</command></link>,
    and is present only for historical reasons.
   </para>
  </refsect1>
@@ -57,8 +57,8 @@ ABORT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
     <listitem>
      <para>
       If <literal>AND CHAIN</literal> is specified, a new transaction is
-      immediately started with the same transaction characteristics (see <xref
-      linkend="sql-set-transaction"/>) as the just finished one.  Otherwise,
+      immediately started with the same transaction characteristics (see <link
+      linkend="sql-set-transaction"><command>SET TRANSACTION</command></link>) as the just finished one.  Otherwise,
       no new transaction is started.
      </para>
     </listitem>
@@ -70,7 +70,7 @@ ABORT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-commit"/> to
+   Use <link linkend="sql-commit"><command>COMMIT</command></link> to
    successfully terminate a transaction.
   </para>
 
index 95934a100f8725de2f9bf0d248d3739d12f3f2c4..aee10a5ca2e0515c04b09354a29720572e646777 100644 (file)
@@ -142,7 +142,7 @@ ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>aggregate_signatu
     The recommended syntax for referencing an ordered-set aggregate
     is to write <literal>ORDER BY</literal> between the direct and aggregated
     argument specifications, in the same style as in
-    <xref linkend="sql-createaggregate"/>.  However, it will also work to
+    <link linkend="sql-createaggregate"><command>CREATE AGGREGATE</command></link>.  However, it will also work to
     omit <literal>ORDER BY</literal> and just run the direct and aggregated
     argument specifications into a single list.  In this abbreviated form,
     if <literal>VARIADIC "any"</literal> was used in both the direct and
index afa42b4926f0d316ca4d2bdaf96dfd9c11b8b997..2db53725139ca4be57b5d22639b1f9d6bc284d52 100644 (file)
@@ -80,7 +80,7 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable>
     <listitem>
      <para>
       This form adds a new constraint to a domain using the same syntax as
-      <xref linkend="sql-createdomain"/>.
+      <link linkend="sql-createdomain"><command>CREATE DOMAIN</command></link>.
       When a new constraint is added to a domain, all columns using that
       domain will be checked against the newly added constraint.  These
       checks can be suppressed by adding the new constraint using the
index 04d53628ec2fb1229380b1782fd58c82fe4f00af..7ca03f3ac9f11a9d9b5b6e33820615537045f0d3 100644 (file)
@@ -71,7 +71,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
     <listitem>
      <para>
       This form adds a new column to the foreign table, using the same syntax as
-      <xref linkend="sql-createforeigntable"/>.
+      <link linkend="sql-createforeigntable"><command>CREATE FOREIGN TABLE</command></link>.
       Unlike the case when adding a column to a regular table, nothing happens
       to the underlying storage: this action simply declares that
       some new column is now accessible through the foreign table.
@@ -133,8 +133,8 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
      <para>
       This form
       sets the per-column statistics-gathering target for subsequent
-      <xref linkend="sql-analyze"/> operations.
-      See the similar form of <xref linkend="sql-altertable"/>
+      <link linkend="sql-analyze"><command>ANALYZE</command></link> operations.
+      See the similar form of <link linkend="sql-altertable"><command>ALTER TABLE</command></link>
       for more details.
      </para>
     </listitem>
@@ -146,7 +146,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
     <listitem>
      <para>
       This form sets or resets per-attribute options.
-      See the similar form of <xref linkend="sql-altertable"/>
+      See the similar form of <link linkend="sql-altertable"><command>ALTER TABLE</command></link>
       for more details.
      </para>
     </listitem>
@@ -159,7 +159,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
     <listitem>
      <para>
       This form sets the storage mode for a column.
-      See the similar form of <xref linkend="sql-altertable"/>
+      See the similar form of <link linkend="sql-altertable"><command>ALTER TABLE</command></link>
       for more details.
       Note that the storage mode has no effect unless the table's
       foreign-data wrapper chooses to pay attention to it.
@@ -172,7 +172,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
     <listitem>
      <para>
       This form adds a new constraint to a foreign table, using the same
-      syntax as <xref linkend="sql-createforeigntable"/>.
+      syntax as <link linkend="sql-createforeigntable"><command>CREATE FOREIGN TABLE</command></link>.
       Currently only <literal>CHECK</literal> constraints are supported.
      </para>
 
@@ -181,7 +181,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
       done to verify the constraint is correct; rather, this action simply
       declares that some new condition should be assumed to hold for all rows
       in the foreign table.  (See the discussion
-      in <xref linkend="sql-createforeigntable"/>.)
+      in <link linkend="sql-createforeigntable"><command>CREATE FOREIGN TABLE</command></link>.)
       If the constraint is marked <literal>NOT VALID</literal>, then it isn't
       assumed to hold, but is only recorded for possible future use.
      </para>
@@ -216,7 +216,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
     <listitem>
      <para>
       These forms configure the firing of trigger(s) belonging to the foreign
-      table.  See the similar form of <xref linkend="sql-altertable"/> for more
+      table.  See the similar form of <link linkend="sql-altertable"><command>ALTER TABLE</command></link> for more
       details.
      </para>
     </listitem>
@@ -239,7 +239,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
      <para>
       This form adds the target foreign table as a new child of the specified
       parent table.
-      See the similar form of <xref linkend="sql-altertable"/>
+      See the similar form of <link linkend="sql-altertable"><command>ALTER TABLE</command></link>
       for more details.
      </para>
     </listitem>
@@ -503,7 +503,7 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
    </para>
 
    <para>
-    Refer to <xref linkend="sql-createforeigntable"/> for a further description of valid
+    Refer to <link linkend="sql-createforeigntable"><command>CREATE FOREIGN TABLE</command></link> for a further description of valid
     parameters.
    </para>
  </refsect1>
index f6e5163109957d2dc9e8f554060eafa20d763c4a..fa4a8df912497584cc65b47bb8d7dbed1e90efa0 100644 (file)
@@ -51,14 +51,14 @@ ALTER GROUP <replaceable class="parameter">group_name</replaceable> RENAME TO <r
    <quote>group</quote> for this purpose.)  These variants are effectively
    equivalent to granting or revoking membership in the role named as the
    <quote>group</quote>; so the preferred way to do this is to use
-   <xref linkend="sql-grant"/> or
-   <xref linkend="sql-revoke"/>.
+   <link linkend="sql-grant"><command>GRANT</command></link> or
+   <link linkend="sql-revoke"><command>REVOKE</command></link>.
   </para>
 
   <para>
    The third variant changes the name of the group.  This is exactly
    equivalent to renaming the role with
-   <xref linkend="sql-alterrole"/>.
+   <link linkend="sql-alterrole"><command>ALTER ROLE</command></link>.
   </para>
  </refsect1>
 
index a5e3b06ee49328aa131d364f6542955c59d7ffa9..793119d2fc1a5d95972523d28c63c9ca3315cfc6 100644 (file)
@@ -81,7 +81,7 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="parameter">name</replaceable>
       this command, use <command>ALTER DATABASE</command> or explicit
       <command>ALTER INDEX</command> invocations instead if desired.
       See also
-      <xref linkend="sql-createtablespace"/>.
+      <link linkend="sql-createtablespace"><command>CREATE TABLESPACE</command></link>.
      </para>
     </listitem>
    </varlistentry>
@@ -118,11 +118,11 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="parameter">name</replaceable>
      <para>
       This form changes one or more index-method-specific storage parameters
       for the index.  See
-      <xref linkend="sql-createindex"/>
+      <link linkend="sql-createindex"><command>CREATE INDEX</command></link>
       for details on the available parameters.  Note that the index contents
       will not be modified immediately by this command; depending on the
       parameter you might need to rebuild the index with
-      <xref linkend="sql-reindex"/>
+      <link linkend="sql-reindex"><command>REINDEX</command></link>
       to get the desired effects.
      </para>
     </listitem>
@@ -144,7 +144,7 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="parameter">name</replaceable>
     <listitem>
      <para>
       This form sets the per-column statistics-gathering target for
-      subsequent <xref linkend="sql-analyze"/> operations, though can
+      subsequent <link linkend="sql-analyze"><command>ANALYZE</command></link> operations, though can
       be used only on index columns that are defined as an expression.
       Since expressions lack a unique name, we refer to them using the
       ordinal number of the index column.
@@ -252,7 +252,7 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="parameter">name</replaceable>
 
    <para>
     These operations are also possible using
-    <xref linkend="sql-altertable"/>.
+    <link linkend="sql-altertable"><command>ALTER TABLE</command></link>.
     <command>ALTER INDEX</command> is in fact just an alias for the forms
     of <command>ALTER TABLE</command> that apply to indexes.
    </para>
index 78ee99bb9cac3743bc1fd4dbe263b89f2fb66cbb..bf379db77e38d09bd2a9b1b9eeae2e67d4bbaae5 100644 (file)
@@ -72,7 +72,8 @@ ALTER MATERIALIZED VIEW ALL IN TABLESPACE <replaceable class="parameter">name</r
    The statement subforms and actions available for
    <command>ALTER MATERIALIZED VIEW</command> are a subset of those available
    for <command>ALTER TABLE</command>, and have the same meaning when used for
-   materialized views.  See the descriptions for <xref linkend="sql-altertable"/>
+   materialized views.  See the descriptions for
+   <link linkend="sql-altertable"><command>ALTER TABLE</command></link>
    for details.
   </para>
  </refsect1>
index d5f166c129bac011f86adf217721cf9eda27a3c8..aef30521bcc5712af95b6cb8ccc7b93198435d74 100644 (file)
@@ -63,11 +63,11 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
   <para>
    The first variant of this command listed in the synopsis can change
    many of the role attributes that can be specified in
-   <xref linkend="sql-createrole"/>.
+   <link linkend="sql-createrole"><command>CREATE ROLE</command></link>.
    (All the possible attributes are covered,
    except that there are no options for adding or removing memberships; use
-   <xref linkend="sql-grant"/> and
-   <xref linkend="sql-revoke"/> for that.)
+   <link linkend="sql-grant"><command>GRANT</command></link> and
+   <link linkend="sql-revoke"><command>REVOKE</command></link> for that.)
    Attributes not mentioned in the command retain their previous settings.
    Database superusers can change any of these settings for any role.
    Roles having <literal>CREATEROLE</literal> privilege can change any of these
@@ -103,8 +103,8 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
    default, overriding whatever setting is present in
    <filename>postgresql.conf</filename> or has been received from the <command>postgres</command>
    command line. This only happens at login time; executing
-   <xref linkend="sql-set-role"/> or
-   <xref linkend="sql-set-session-authorization"/> does not cause new
+   <link linkend="sql-set-role"><command>SET ROLE</command></link> or
+   <link linkend="sql-set-session-authorization"><command>SET SESSION AUTHORIZATION</command></link> does not cause new
    configuration values to be set.
    Settings set for all databases are overridden by database-specific settings
    attached to a role.  Settings for specific databases or specific roles override
@@ -176,7 +176,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
       <listitem>
        <para>
         These clauses alter attributes originally set by
-        <xref linkend="sql-createrole"/>. For more information, see the
+        <link linkend="sql-createrole"><command>CREATE ROLE</command></link>. For more information, see the
         <command>CREATE ROLE</command> reference page.
        </para>
       </listitem>
@@ -220,8 +220,8 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
 
        <para>
         Role-specific variable settings take effect only at login;
-        <xref linkend="sql-set-role"/> and
-        <xref linkend="sql-set-session-authorization"/>
+        <link linkend="sql-set-role"><command>SET ROLE</command></link> and
+        <link linkend="sql-set-session-authorization"><command>SET SESSION AUTHORIZATION</command></link>
         do not process role-specific variable settings.
        </para>
 
@@ -239,14 +239,14 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-createrole"/>
-   to add new roles, and <xref linkend="sql-droprole"/> to remove a role.
+   Use <link linkend="sql-createrole"><command>CREATE ROLE</command></link>
+   to add new roles, and <link linkend="sql-droprole"><command>DROP ROLE</command></link> to remove a role.
   </para>
 
   <para>
    <command>ALTER ROLE</command> cannot change a role's memberships.
-   Use <xref linkend="sql-grant"/> and
-   <xref linkend="sql-revoke"/>
+   Use <link linkend="sql-grant"><command>GRANT</command></link> and
+   <link linkend="sql-revoke"><command>REVOKE</command></link>
    to do that.
   </para>
 
index 5f60ca8eac2a5235b50d6ac1b03beb9cc3b2b61a..ce6cdf2bb1eccca824a0b689ad958e920b7594b5 100644 (file)
@@ -99,7 +99,7 @@ ALTER STATISTICS <replaceable class="parameter">name</replaceable> SET STATISTIC
       <listitem>
        <para>
         The statistic-gathering target for this statistics object for subsequent
-        <xref linkend="sql-analyze"/> operations.
+        <link linkend="sql-analyze"><command>ANALYZE</command></link> operations.
         The target can be set in the range 0 to 10000; alternatively, set it
         to -1 to revert to using the maximum of the statistics target of the
         referenced columns, if set, or the system default statistics
index f034e75ec0991acb1afb66e98413673f5ad803c9..c25ef5abd6aded076b766eb0f7baa04328dbc178 100644 (file)
@@ -152,7 +152,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
     <listitem>
      <para>
       This form adds a new column to the table, using the same syntax as
-      <xref linkend="sql-createtable"/>. If <literal>IF NOT EXISTS</literal>
+      <link linkend="sql-createtable"><command>CREATE TABLE</command></link>. If <literal>IF NOT EXISTS</literal>
       is specified and a column already exists with this name,
       no error is thrown.
      </para>
@@ -268,7 +268,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       These forms change whether a column is an identity column or change the
       generation attribute of an existing identity column.
-      See <xref linkend="sql-createtable"/> for details.
+      See <link linkend="sql-createtable"><command>CREATE TABLE</command></link> for details.
       Like <literal>SET DEFAULT</literal>, these forms only affect the
       behavior of subsequent <command>INSERT</command>
       and <command>UPDATE</command> commands; they do not cause rows
@@ -290,7 +290,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       These forms alter the sequence that underlies an existing identity
       column.  <replaceable>sequence_option</replaceable> is an option
-      supported by <xref linkend="sql-altersequence"/> such
+      supported by <link linkend="sql-altersequence"><command>ALTER SEQUENCE</command></link> such
       as <literal>INCREMENT BY</literal>.
      </para>
     </listitem>
@@ -302,7 +302,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       This form
       sets the per-column statistics-gathering target for subsequent
-      <xref linkend="sql-analyze"/> operations.
+      <link linkend="sql-analyze"><command>ANALYZE</command></link> operations.
       The target can be set in the range 0 to 10000; alternatively, set it
       to -1 to revert to using the system default statistics
       target (<xref linkend="guc-default-statistics-target"/>).
@@ -326,7 +326,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       defined per-attribute options are <literal>n_distinct</literal> and
       <literal>n_distinct_inherited</literal>, which override the
       number-of-distinct-values estimates made by subsequent
-      <xref linkend="sql-analyze"/>
+      <link linkend="sql-analyze"><command>ANALYZE</command></link>
       operations.  <literal>n_distinct</literal> affects the statistics for the table
       itself, while <literal>n_distinct_inherited</literal> affects the statistics
       gathered for the table plus its inheritance children.  When set to a
@@ -388,7 +388,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
     <listitem>
      <para>
       This form adds a new constraint to a table using the same constraint
-      syntax as <xref linkend="sql-createtable"/>, plus the option <literal>NOT
+      syntax as <link linkend="sql-createtable"><command>CREATE TABLE</command></link>, plus the option <literal>NOT
       VALID</literal>, which is currently only allowed for foreign key
       and CHECK constraints.
      </para>
@@ -422,7 +422,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
 
      <para>
       Additional restrictions apply when unique or primary key constraints
-      are added to partitioned tables; see <xref linkend="sql-createtable"/>.
+      are added to partitioned tables; see <link linkend="sql-createtable"><command>CREATE TABLE</command></link>.
       Also, foreign key constraints on partitioned
       tables may not be declared <literal>NOT VALID</literal> at present.
      </para>
@@ -598,7 +598,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       even if row level security is disabled.  In this case, the policies will
       <emphasis>not</emphasis> be applied and the policies will be ignored.
       See also
-      <xref linkend="sql-createpolicy"/>.
+      <link linkend="sql-createpolicy"><command>CREATE POLICY</command></link>.
      </para>
     </listitem>
    </varlistentry>
@@ -613,7 +613,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       disabled (the default) then row level security will not be applied when
       the user is the table owner.
       See also
-      <xref linkend="sql-createpolicy"/>.
+      <link linkend="sql-createpolicy"><command>CREATE POLICY</command></link>.
      </para>
     </listitem>
    </varlistentry>
@@ -623,7 +623,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
     <listitem>
      <para>
       This form selects the default index for future
-      <xref linkend="sql-cluster"/>
+      <link linkend="sql-cluster"><command>CLUSTER</command></link>
       operations.  It does not actually re-cluster the table.
      </para>
      <para>
@@ -637,7 +637,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
     <listitem>
      <para>
       This form removes the most recently used
-      <xref linkend="sql-cluster"/>
+      <link linkend="sql-cluster"><command>CLUSTER</command></link>
       index specification from the table.  This affects
       future cluster operations that don't specify an index.
      </para>
@@ -685,7 +685,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       <literal>information_schema</literal> relations are not considered part
       of the system catalogs and will be moved.
       See also
-      <xref linkend="sql-createtablespace"/>.
+      <link linkend="sql-createtablespace"><command>CREATE TABLESPACE</command></link>.
      </para>
     </listitem>
    </varlistentry>
@@ -707,12 +707,12 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       This form changes one or more storage parameters for the table.  See
       <xref linkend="sql-createtable-storage-parameters"/> in the
-      <xref linkend="sql-createtable"/> documentation
+      <link linkend="sql-createtable"><command>CREATE TABLE</command></link> 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.
-      That can be done with <link linkend="sql-vacuum">VACUUM
-      FULL</link>, <xref linkend="sql-cluster"/> or one of the forms
+      That can be done with <link linkend="sql-vacuum"><command>VACUUM
+      FULL</command></link>, <link linkend="sql-cluster"><command>CLUSTER</command></link> or one of the forms
       of <command>ALTER TABLE</command> that forces a table rewrite.
       For planner related parameters, changes will take effect from the next
       time the table is locked so currently executing queries will not be
@@ -878,7 +878,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       A partition using <literal>FOR VALUES</literal> uses same syntax for
       <replaceable class="parameter">partition_bound_spec</replaceable> as
-      <xref linkend="sql-createtable"/>.  The partition bound specification
+      <link linkend="sql-createtable"><command>CREATE TABLE</command></link>.  The partition bound specification
       must correspond to the partitioning strategy and partition key of the
       target table.  The table to be attached must have all the same columns
       as the target table and no more; moreover, the column types must also
index 6d4784c82f195986d2a470079ef170789e3e456d..43a7da4f0bcf39e150e0bde35227ba9972f3cb07 100644 (file)
@@ -93,7 +93,7 @@ ALTER TRIGGER <replaceable class="parameter">name</replaceable> ON <replaceable
 
    <para>
     The ability to temporarily enable or disable a trigger is provided by
-    <xref linkend="sql-altertable"/>, not by
+    <link linkend="sql-altertable"><command>ALTER TABLE</command></link>, not by
     <command>ALTER TRIGGER</command>, because <command>ALTER TRIGGER</command> has no
     convenient way to express the option of enabling or disabling all of
     a table's triggers at once.
index a4f09c660be3c7df8c9817a0ec119c1755d9e6df..64bf266373d45d86153b3a09e9ea3bb36b5c072f 100644 (file)
@@ -90,7 +90,7 @@ ALTER TYPE <replaceable class="parameter">name</replaceable> SET ( <replaceable
     <listitem>
      <para>
       This form adds a new attribute to a composite type, using the same syntax as
-      <xref linkend="sql-createtype"/>.
+      <link linkend="sql-createtype"><command>CREATE TYPE</command></link>.
      </para>
     </listitem>
    </varlistentry>
index 51527cefb4c435d00d6dafe96f11a04f29ce332f..0ee89f54c5ce05a7e37012682a213d2578a64a05 100644 (file)
@@ -57,7 +57,7 @@ ALTER USER { <replaceable class="parameter">role_specification</replaceable> | A
 
   <para>
    <command>ALTER USER</command> is now an alias for
-   <xref linkend="sql-alterrole"/>.
+   <link linkend="sql-alterrole"><command>ALTER ROLE</command></link>.
   </para>
  </refsect1>
 
index 5ac3ba8321937a3daf40d70a13eb494bf861f87e..7d816c87c6030155512edcbcf1423d0a4162cc34 100644 (file)
@@ -174,7 +174,7 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
    just after making major changes in the contents of a table.  Accurate
    statistics will help the planner to choose the most appropriate query
    plan, and thereby improve the speed of query processing.  A common
-   strategy for read-mostly databases is to run <xref linkend="sql-vacuum"/>
+   strategy for read-mostly databases is to run <link linkend="sql-vacuum"><command>VACUUM</command></link>
    and <command>ANALYZE</command> once a day during a low-usage time of day.
    (This will not be sufficient if there is heavy update activity.)
   </para>
@@ -205,7 +205,7 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
    will change slightly each time <command>ANALYZE</command> is run,
    even if the actual table contents did not change.  This might result
    in small changes in the planner's estimated costs shown by
-   <xref linkend="sql-explain"/>.
+   <link linkend="sql-explain"><command>EXPLAIN</command></link>.
    In rare situations, this non-determinism will cause the planner's
    choices of query plans to change after <command>ANALYZE</command> is run.
    To avoid this, raise the amount of statistics collected by
@@ -216,8 +216,8 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
    The extent of analysis can be controlled by adjusting the
    <xref linkend="guc-default-statistics-target"/> configuration variable, or
    on a column-by-column basis by setting the per-column statistics
-   target with <command>ALTER TABLE ... ALTER COLUMN ... SET
-   STATISTICS</command> (see <xref linkend="sql-altertable"/>).
+   target with <link linkend="sql-altertable"><command>ALTER TABLE ... ALTER COLUMN ... SET
+   STATISTICS</command></link>.
    The target value sets the
    maximum number of entries in the most-common-value list and the
    maximum number of bins in the histogram.  The default target value
@@ -246,8 +246,7 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
    with the largest possible statistics target.  If this inaccuracy leads to
    bad query plans, a more accurate value can be determined manually and then
    installed with
-   <command>ALTER TABLE ... ALTER COLUMN ... SET (n_distinct = ...)</command>
-   (see <xref linkend="sql-altertable"/>).
+   <link linkend="sql-altertable"><command>ALTER TABLE ... ALTER COLUMN ... SET (n_distinct = ...)</command></link>.
   </para>
 
   <para>
index c23bbfb4e711c3f8c7df8939f862d050dadc0b85..016b02148741164d106194671b39231b6728e7af 100644 (file)
@@ -37,9 +37,9 @@ BEGIN [ WORK | TRANSACTION ] [ <replaceable class="parameter">transaction_mode</
   <para>
    <command>BEGIN</command> initiates a transaction block, that is,
    all statements after a <command>BEGIN</command> command will be
-   executed in a single transaction until an explicit <xref
-   linkend="sql-commit"/> or <xref
-   linkend="sql-rollback"/> is given.
+   executed in a single transaction until an explicit <link
+   linkend="sql-commit"><command>COMMIT</command></link> or <link
+   linkend="sql-rollback"><command>ROLLBACK</command></link> is given.
    By default (without <command>BEGIN</command>),
    <productname>PostgreSQL</productname> executes
    transactions in <quote>autocommit</quote> mode, that is, each
@@ -60,7 +60,7 @@ BEGIN [ WORK | TRANSACTION ] [ <replaceable class="parameter">transaction_mode</
   <para>
    If the isolation level, read/write mode, or deferrable mode is specified, the new
    transaction has those characteristics, as if
-   <xref linkend="sql-set-transaction"/>
+   <link linkend="sql-set-transaction"><command>SET TRANSACTION</command></link>
    was executed.
   </para>
  </refsect1>
@@ -90,13 +90,13 @@ BEGIN [ WORK | TRANSACTION ] [ <replaceable class="parameter">transaction_mode</
   <title>Notes</title>
 
   <para>
-   <xref linkend="sql-start-transaction"/> has the same functionality
+   <link linkend="sql-start-transaction"><command>START TRANSACTION</command></link> has the same functionality
    as <command>BEGIN</command>.
   </para>
 
   <para>
-   Use <xref linkend="sql-commit"/> or
-   <xref linkend="sql-rollback"/>
+   Use <link linkend="sql-commit"><command>COMMIT</command></link> or
+   <link linkend="sql-rollback"><command>ROLLBACK</command></link>
    to terminate a transaction block.
   </para>
 
@@ -131,7 +131,7 @@ BEGIN;
   <para>
    <command>BEGIN</command> is a <productname>PostgreSQL</productname>
    language extension.  It is equivalent to the SQL-standard command
-   <xref linkend="sql-start-transaction"/>, whose reference page
+   <link linkend="sql-start-transaction"><command>START TRANSACTION</command></link>, whose reference page
    contains additional compatibility information.
   </para>
 
index e464df1965d9fc60b0c5ba667d44bf920b95a533..32d20edd6aa421b6de9528e6b274bbe8d7108c7a 100644 (file)
@@ -84,7 +84,7 @@ CLOSE { <replaceable class="parameter">name</replaceable> | ALL }
    <productname>PostgreSQL</productname> does not have an explicit
    <command>OPEN</command> cursor statement; a cursor is considered
    open when it is declared.  Use the
-   <xref linkend="sql-declare"/>
+   <link linkend="sql-declare"><command>DECLARE</command></link>
    statement to declare a cursor.
   </para>
 
index 4da60d8d56abecab50e73f03dabc9c3dc1c8e261..b9450e7366ae35355f2bc6a2704370fecd0c8079 100644 (file)
@@ -57,7 +57,7 @@ CLUSTER [VERBOSE]
    <command>CLUSTER <replaceable class="parameter">table_name</replaceable></command>
    reclusters the table using the same index as before.  You can also
    use the <literal>CLUSTER</literal> or <literal>SET WITHOUT CLUSTER</literal>
-   forms of <xref linkend="sql-altertable"/> to set the index to be used for
+   forms of <link linkend="sql-altertable"><command>ALTER TABLE</command></link> to set the index to be used for
    future cluster operations, or to clear any previous setting.
   </para>
 
@@ -159,7 +159,7 @@ CLUSTER [VERBOSE]
 
    <para>
     Because the planner records statistics about the ordering of
-    tables, it is advisable to run <xref linkend="sql-analyze"/>
+    tables, it is advisable to run <link linkend="sql-analyze"><command>ANALYZE</command></link>
     on the newly clustered table.
     Otherwise, the planner might make poor choices of query plans.
    </para>
index 18189abc6c90b30eed68dc5b22d89c6aa0c33962..369342b74d5b509587ba7648a27e9ff4ea9b53a7 100644 (file)
@@ -112,9 +112,11 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     <term><replaceable class="parameter">query</replaceable></term>
     <listitem>
      <para>
-      A <xref linkend="sql-select"/>, <xref linkend="sql-values"/>,
-      <xref linkend="sql-insert"/>, <xref linkend="sql-update"/> or
-      <xref linkend="sql-delete"/> command whose results are to be
+      A <link linkend="sql-select"><command>SELECT</command></link>,
+      <link linkend="sql-values"><command>VALUES</command></link>,
+      <link linkend="sql-insert"><command>INSERT</command></link>,
+      <link linkend="sql-update"><command>UPDATE</command></link>, or
+      <link linkend="sql-delete"><command>DELETE</command></link> command whose results are to be
       copied.  Note that parentheses are required around the query.
      </para>
      <para>
index a315fff8bd3f6e719275443f4f764a8c9158f420..222e0aa5c9d08bf7223664438af0c9525e655581 100644 (file)
@@ -629,7 +629,7 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1;
      <para>
       The meanings of <literal>PARALLEL SAFE</literal>, <literal>PARALLEL
       RESTRICTED</literal>, and <literal>PARALLEL UNSAFE</literal> are the same as
-      in <xref linkend="sql-createfunction"/>.  An aggregate will not be
+      in <link linkend="sql-createfunction"><command>CREATE FUNCTION</command></link>.  An aggregate will not be
       considered for parallelization if it is marked <literal>PARALLEL
       UNSAFE</literal> (which is the default!) or <literal>PARALLEL RESTRICTED</literal>.
       Note that the parallel-safety markings of the aggregate's support
index 2b4d4d557328dab99d5402e81c426b6d04eda5f2..bad75bc1dce5bc9016bd163b2031b0043e998bbf 100644 (file)
@@ -304,7 +304,7 @@ SELECT CAST ( 2 AS numeric ) + 4.0;
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-dropcast"/> to remove user-defined casts.
+   Use <link linkend="sql-dropcast"><command>DROP CAST</command></link> to remove user-defined casts.
   </para>
 
   <para>
index 420576c5e83eb9542cccd961f2a218c80566e09d..41cb4068ec2fcbcfd4ce4ddb030a2ac068e55685 100644 (file)
@@ -226,7 +226,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
    </para>
 
    <para>
-    Use <xref linkend="sql-dropdatabase"/> to remove a database.
+    Use <link linkend="sql-dropdatabase"><command>DROP DATABASE</command></link> to remove a database.
    </para>
 
    <para>
@@ -235,9 +235,9 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
    </para>
 
    <para>
-    Database-level configuration parameters (set via <xref
-    linkend="sql-alterdatabase"/>) and database-level permissions (set via
-    <xref linkend="sql-grant"/>) are not copied from the template database.
+    Database-level configuration parameters (set via <link
+    linkend="sql-alterdatabase"><command>ALTER DATABASE</command></link>) and database-level permissions (set via
+    <link linkend="sql-grant"><command>GRANT</command></link>) are not copied from the template database.
    </para>
 
   <para>
index 3ee0f2d635d3087a6d78983d4b20abbda07665af..f9477efe58d724b2faa389a6fa8b2e023b58d947 100644 (file)
@@ -159,7 +159,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ]
       tables from which the new foreign table automatically inherits
       all columns.  Parent tables can be plain tables or foreign tables.
       See the similar form of
-      <xref linkend="sql-createtable"/> for more details.
+      <link linkend="sql-createtable"><command>CREATE TABLE</command></link> for more details.
      </para>
     </listitem>
    </varlistentry>
@@ -171,7 +171,7 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ]
       This form can be used to create the foreign table as partition of
       the given parent table with specified partition bound values.
       See the similar form of
-      <xref linkend="sql-createtable"/> for more details.
+      <link linkend="sql-createtable"><command>CREATE TABLE</command></link> for more details.
       Note that it is currently not allowed to create the foreign table as a
       partition of the parent table if there are <literal>UNIQUE</literal>
       indexes on the parent table.  (See also
index 97285b757841606fa1a77acd21babbf3b884ee10..3c1eaea651cbf04a19ec111774067cd87476d6e6 100644 (file)
@@ -557,7 +557,7 @@ CREATE [ OR REPLACE ] FUNCTION
        the SQL function. The string <replaceable
        class="parameter">obj_file</replaceable> is the name of the shared
        library file containing the compiled C function, and is interpreted
-       as for the <xref linkend="sql-load"/> command.  The string
+       as for the <link linkend="sql-load"><command>LOAD</command></link> command.  The string
        <replaceable class="parameter">link_symbol</replaceable> is the
        function's link symbol, that is, the name of the function in the C
        language source code.  If the link symbol is omitted, it is assumed to
index 7fa79f4cbfb0efb1637fd8bc305b0baf39ae9f48..847b8efcf4d85ff24ebee35365c4f3d133ac9bcc 100644 (file)
@@ -779,8 +779,8 @@ Indexes:
   </para>
 
   <para>
-   Setting a value for <literal>parallel_workers</literal> via <xref
-   linkend="sql-altertable"/> directly controls how many parallel
+   Setting a value for <literal>parallel_workers</literal> via <link
+   linkend="sql-altertable"><command>ALTER TABLE</command></link> directly controls how many parallel
    worker processes will be requested by a <command>CREATE
    INDEX</command> against the table.  This bypasses the cost model
    completely, and prevents <varname>maintenance_work_mem</varname>
@@ -808,7 +808,7 @@ Indexes:
   </para>
 
   <para>
-   Use <xref linkend="sql-dropindex"/>
+   Use <link linkend="sql-dropindex"><command>DROP INDEX</command></link>
    to remove an index.
   </para>
 
index 10d1533d6d8c98e4dbb9030557c3599af5dc061a..102efe5a6c7f7ea7ef43fe41f145a4aeef38a5df 100644 (file)
@@ -137,7 +137,7 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa
       <para><replaceable class="parameter">inline_handler</replaceable> is the
        name of a previously registered function that will be called
        to execute an anonymous code block
-       (<xref linkend="sql-do"/> command)
+       (<link linkend="sql-do"><command>DO</command></link> command)
        in this language.
        If no <replaceable class="parameter">inline_handler</replaceable>
        function is specified, the language does not support anonymous code
@@ -183,7 +183,7 @@ CREATE [ OR REPLACE ] [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="pa
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-droplanguage"/> to drop procedural languages.
+   Use <link linkend="sql-droplanguage"><command>DROP LANGUAGE</command></link> to drop procedural languages.
   </para>
 
   <para>
index de9f17655c63203bc5cb87e7a1187cad96a26a58..5ba851b687a42c389b6d6f6fac18e199e99c9763 100644 (file)
@@ -132,8 +132,8 @@ CREATE MATERIALIZED VIEW [ IF NOT EXISTS ] <replaceable>table_name</replaceable>
     <term><replaceable>query</replaceable></term>
     <listitem>
      <para>
-      A <xref linkend="sql-select"/>, <link linkend="sql-table">TABLE</link>,
-      or <xref linkend="sql-values"/> command.  This query will run within a
+      A <link linkend="sql-select"><command>SELECT</command></link>, <link linkend="sql-table"><command>TABLE</command></link>,
+      or <link linkend="sql-values"><command>VALUES</command></link> command.  This query will run within a
       security-restricted operation; in particular, calls to functions that
       themselves create temporary tables will fail.
      </para>
index 9462bc1e8caa60f1b3c4a633838da9d4f75cd6d2..e27512ff39193e0ded2e788cd98aab337ea9f3f1 100644 (file)
@@ -251,8 +251,8 @@ COMMUTATOR = OPERATOR(myschema.===) ,
   </para>
 
   <para>
-   Use <xref linkend="sql-dropoperator"/> to delete user-defined operators
-   from a database.  Use <xref linkend="sql-alteroperator"/> to modify operators in a
+   Use <link linkend="sql-dropoperator"><command>DROP OPERATOR</command></link> to delete user-defined operators
+   from a database.  Use <link linkend="sql-alteroperator"><command>ALTER OPERATOR</command></link> to modify operators in a
    database.
   </para>
  </refsect1>
index d225695626cbf173a92b8acfc2b4127972676587..36c307cadc796c40d0733a2e4edb5876dc326358 100644 (file)
@@ -285,7 +285,7 @@ CREATE [ OR REPLACE ] PROCEDURE
        the SQL procedure. The string <replaceable
        class="parameter">obj_file</replaceable> is the name of the shared
        library file containing the compiled C procedure, and is interpreted
-       as for the <xref linkend="sql-load"/> command.  The string
+       as for the <link linkend="sql-load"><command>LOAD</command></link> command.  The string
        <replaceable class="parameter">link_symbol</replaceable> is the
        procedure's link symbol, that is, the name of the procedure in the C
        language source code.  If the link symbol is omitted, it is assumed
index 6e4148a17c486b444dc0c39abe5670209e7879b8..d23133945db2048ba9b2c822c8fca398f04e44b7 100644 (file)
@@ -162,7 +162,7 @@ in sync when changing the above synopsis!
         If not specified,
         <literal>NOLOGIN</literal> is the default, except when
         <command>CREATE ROLE</command> is invoked through its alternative spelling
-        <xref linkend="sql-createuser"/>.
+        <link linkend="sql-createuser"><command>CREATE USER</command></link>.
        </para>
       </listitem>
      </varlistentry>
@@ -335,8 +335,8 @@ in sync when changing the above synopsis!
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-alterrole"/> to
-   change the attributes of a role, and <xref linkend="sql-droprole"/>
+   Use <link linkend="sql-alterrole"><command>ALTER ROLE</command></link> to
+   change the attributes of a role, and <link linkend="sql-droprole"><command>DROP ROLE</command></link>
    to remove a role.  All the attributes
    specified by <command>CREATE ROLE</command> can be modified by later
    <command>ALTER ROLE</command> commands.
@@ -345,8 +345,8 @@ in sync when changing the above synopsis!
   <para>
    The preferred way to add and remove members of roles that are being
    used as groups is to use
-   <xref linkend="sql-grant"/> and
-   <xref linkend="sql-revoke"/>.
+   <link linkend="sql-grant"><command>GRANT</command></link> and
+   <link linkend="sql-revoke"><command>REVOKE</command></link>.
   </para>
 
   <para>
@@ -364,7 +364,7 @@ in sync when changing the above synopsis!
    a member of a role with <literal>CREATEDB</literal> privilege does not immediately
    grant the ability to create databases, even if <literal>INHERIT</literal> is set;
    it would be necessary to become that role via
-   <xref linkend="sql-set-role"/> before
+   <link linkend="sql-set-role"><command>SET ROLE</command></link> before
    creating a database.
   </para>
 
index 087cad184c0cdfee8f4dfa70b7e43f9bd8b029ec..28f844071b06367f7eb8b29fcedf13fd719ff8f9 100644 (file)
@@ -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>
index a4640929cfba6c2d59ff11507109cfebae9646fe..bcbd73b2272caa00af4b8004b16c035ff55f6fa7 100644 (file)
@@ -185,8 +185,8 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI
         <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.
          </para>
         </listitem>
@@ -222,9 +222,9 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI
     <term><replaceable>query</replaceable></term>
     <listitem>
      <para>
-      A <xref linkend="sql-select"/>, <link
-      linkend="sql-table">TABLE</link>, or <xref linkend="sql-values"/>
-      command, or an <xref linkend="sql-execute"/> command that runs a
+      A <link linkend="sql-select"><command>SELECT</command></link>, <link
+      linkend="sql-table"><command>TABLE</command></link>, or <link linkend="sql-values"><command>VALUES</command></link>
+      command, or an <link linkend="sql-execute"><command>EXECUTE</command></link> command that runs a
       prepared <command>SELECT</command>, <command>TABLE</command>, or
       <command>VALUES</command> query.
      </para>
index 5b46c23196db20294ab92f7f798e8ee52ddc05fb..3f81dc6bba2cf64fc20ed6acfd1c020df2f44ae9 100644 (file)
@@ -147,7 +147,7 @@ CREATE [ OR REPLACE ] TRANSFORM FOR <replaceable>type_name</replaceable> LANGUAG
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-droptransform"/> to remove transforms.
+   Use <link linkend="sql-droptransform"><command>DROP TRANSFORM</command></link> to remove transforms.
   </para>
  </refsect1>
 
index 289dd1d9da8eff7b2a9d69914a417a6742f0574a..60346e1e83b02c4ff9f51d10de8dc81c8cf822cd 100644 (file)
@@ -170,7 +170,7 @@ CREATE [ CONSTRAINT ] TRIGGER <replaceable class="parameter">name</replaceable>
    When the <literal>CONSTRAINT</literal> option is specified, this command creates a
    <firstterm>constraint trigger</firstterm>.  This is the same as a regular trigger
    except that the timing of the trigger firing can be adjusted using
-   <xref linkend="sql-set-constraints"/>.
+   <link linkend="sql-set-constraints"><command>SET CONSTRAINTS</command></link>.
    Constraint triggers must be <literal>AFTER ROW</literal> triggers on plain
    tables (not foreign tables).  They
    can be fired either at the end of the statement causing the triggering
@@ -442,7 +442,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
   </para>
 
   <para>
-   Use <xref linkend="sql-droptrigger"/> to remove a trigger.
+   Use <link linkend="sql-droptrigger"><command>DROP TRIGGER</command></link> to remove a trigger.
   </para>
 
   <para>
index 111f8e65d29d7f7576799ddcb4dea7168feb6aff..970b517db9f21d8a225a49ed7f28a278e523ec34 100644 (file)
@@ -121,8 +121,8 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
     must be less than <symbol>NAMEDATALEN</symbol> bytes long (64 bytes in a
     standard <productname>PostgreSQL</productname> build).  (It is possible to
     create an enumerated type with zero labels, but such a type cannot be used
-    to hold values before at least one label is added using <xref
-    linkend="sql-altertype"/>.)
+    to hold values before at least one label is added using <link
+    linkend="sql-altertype"><command>ALTER TYPE</command></link>.)
    </para>
   </refsect2>
 
index 198e06e7230e82ec61f7bcfa70c5c5736dcbbf6d..48d2089238c7ff0edf79013f591e2e5825b88a93 100644 (file)
@@ -49,7 +49,7 @@ CREATE USER <replaceable class="parameter">name</replaceable> [ [ WITH ] <replac
 
   <para>
    <command>CREATE USER</command> is now an alias for
-   <xref linkend="sql-createrole"/>.
+   <link linkend="sql-createrole"><command>CREATE ROLE</command></link>.
    The only difference is that when the command is spelled
    <command>CREATE USER</command>, <literal>LOGIN</literal> is assumed
    by default, whereas <literal>NOLOGIN</literal> is assumed when
index eb5591b63c73fbb04fa656d0280b2ca6689cb425..4b5b1cf795318cbef3fe4368f75d8a02bc6f225b 100644 (file)
@@ -137,8 +137,8 @@ CREATE VIEW [ <replaceable>schema</replaceable> . ] <replaceable>view_name</repl
           This parameter may be either <literal>local</literal> or
           <literal>cascaded</literal>, and is equivalent to specifying
           <literal>WITH [ CASCADED | LOCAL ] CHECK OPTION</literal> (see below).
-          This option can be changed on existing views using <xref
-          linkend="sql-alterview"/>.
+          This option can be changed on existing views using <link
+          linkend="sql-alterview"><command>ALTER VIEW</command></link>.
          </para>
         </listitem>
        </varlistentry>
@@ -160,8 +160,8 @@ CREATE VIEW [ <replaceable>schema</replaceable> . ] <replaceable>view_name</repl
     <term><replaceable class="parameter">query</replaceable></term>
     <listitem>
      <para>
-      A <xref linkend="sql-select"/> or
-      <xref linkend="sql-values"/> command
+      A <link linkend="sql-select"><command>SELECT</command></link> or
+      <link linkend="sql-values"><command>VALUES</command></link> command
       which will provide the columns and rows of the view.
      </para>
     </listitem>
@@ -245,7 +245,7 @@ CREATE VIEW [ <replaceable>schema</replaceable> . ] <replaceable>view_name</repl
   <title>Notes</title>
 
    <para>
-    Use the <xref linkend="sql-dropview"/>
+    Use the <link linkend="sql-dropview"><command>DROP VIEW</command></link>
     statement to drop views.
    </para>
 
index d3c92943f0714f46a1ce3c915aaebd0671858e6e..95cc82dc88bd129e92c3a4b835f972716bb8373b 100644 (file)
@@ -46,7 +46,7 @@ PostgreSQL documentation
 
   <para>
    <application>createdb</application> is a wrapper around the
-   <acronym>SQL</acronym> command <xref linkend="sql-createdatabase"/>.
+   <acronym>SQL</acronym> command <link linkend="sql-createdatabase"><command>CREATE DATABASE</command></link>.
    There is no effective difference between creating databases via
    this utility and via other methods for accessing the server.
   </para>
@@ -197,7 +197,7 @@ PostgreSQL documentation
     The options <option>-D</option>, <option>-l</option>, <option>-E</option>,
     <option>-O</option>, and
     <option>-T</option> correspond to options of the underlying
-    SQL command <xref linkend="sql-createdatabase"/>; see there for more information
+    SQL command <link linkend="sql-createdatabase"><command>CREATE DATABASE</command></link>; see there for more information
     about them.
    </para>
 
index 9d24df8b7a8879e5e3de695f943eced5dd1ebbe4..4d60dc2cda123d0683c6446660881506eec51f6d 100644 (file)
@@ -49,7 +49,7 @@ PostgreSQL documentation
 
   <para>
    <application>createuser</application> is a wrapper around the
-   <acronym>SQL</acronym> command <xref linkend="sql-createrole"/>.
+   <acronym>SQL</acronym> command <link linkend="sql-createrole"><command>CREATE ROLE</command></link>.
    There is no effective difference between creating users via
    this utility and via other methods for accessing the server.
   </para>
index d6177dcd9c44ed2cfab5ffb7caccda82ee5e97a7..2152134635e462ae762f5ffb6b230a2c1c52e7bc 100644 (file)
@@ -39,7 +39,7 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI
    can be used to retrieve
    a small number of rows at a time out of a larger query.
    After the cursor is created, rows are fetched from it using
-   <xref linkend="sql-fetch"/>.
+   <link linkend="sql-fetch"><command>FETCH</command></link>.
   </para>
 
   <note>
@@ -124,8 +124,8 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI
     <term><replaceable class="parameter">query</replaceable></term>
     <listitem>
      <para>
-      A <xref linkend="sql-select"/> or
-      <xref linkend="sql-values"/> command
+      A <link linkend="sql-select"><command>SELECT</command></link> or
+      <link linkend="sql-values"><command>VALUES</command></link> command
       which will provide the rows to be returned by the cursor.
      </para>
     </listitem>
@@ -183,9 +183,9 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI
     <productname>PostgreSQL</productname> reports an error if such a
     command is used outside a transaction block.
     Use
-    <xref linkend="sql-begin"/> and
-    <xref linkend="sql-commit"/>
-    (or <xref linkend="sql-rollback"/>)
+    <link linkend="sql-begin"><command>BEGIN</command></link> and
+    <link linkend="sql-commit"><command>COMMIT</command></link>
+    (or <link linkend="sql-rollback"><command>ROLLBACK</command></link>)
     to define a transaction block.
    </para>
 
@@ -244,7 +244,7 @@ DECLARE <replaceable class="parameter">name</replaceable> [ BINARY ] [ INSENSITI
     If the cursor's query includes <literal>FOR UPDATE</literal> or <literal>FOR
     SHARE</literal>, then returned rows are locked at the time they are first
     fetched, in the same way as for a regular
-    <xref linkend="sql-select"/> command with
+    <link linkend="sql-select"><command>SELECT</command></link> command with
     these options.
     In addition, the returned rows will be the most up-to-date versions;
     therefore these options provide the equivalent of what the SQL standard
index ec3c40df2ea9dcfbbd4f78a62bfb82a48cab6028..1b81b4e7d743f49c52e17deaa6035adec878a7bf 100644 (file)
@@ -41,7 +41,7 @@ DELETE FROM [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ *
 
    <tip>
     <para>
-     <xref linkend="sql-truncate"/> provides a
+     <link linkend="sql-truncate"><command>TRUNCATE</command></link> provides a
      faster mechanism to remove all rows from a table.
     </para>
    </tip>
index 47d4a72121b6f2e78d20da7d3d96310fd3a7e254..eb7dc182c82b395077f78eaf79bea22a9ddd8b2e 100644 (file)
@@ -30,7 +30,7 @@ DROP GROUP [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ..
 
   <para>
    <command>DROP GROUP</command> is now an alias for
-   <xref linkend="sql-droprole"/>.
+   <link linkend="sql-droprole"><command>DROP ROLE</command></link>.
   </para>
  </refsect1>
 
index 4705836ac79e811f35e74ed750102835b3b1acdc..8ba6621bc4af2855276a936947ea8cecae5aebcc 100644 (file)
@@ -38,7 +38,7 @@ DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] <replaceable class="parameter">name</
    <para>
     As of <productname>PostgreSQL</productname> 9.1, most procedural
     languages have been made into <quote>extensions</quote>, and should
-    therefore be removed with <xref linkend="sql-dropextension"/>
+    therefore be removed with <link linkend="sql-dropextension"><command>DROP EXTENSION</command></link>
     not <command>DROP LANGUAGE</command>.
    </para>
   </note>
index dcc375f33bf8d77e57b1053e29cf80ed1c40c8fe..8fa8c414a10e47539f011c5fd46db5cd3a626998 100644 (file)
@@ -90,7 +90,7 @@ DROP OWNED BY { <replaceable class="parameter">name</replaceable> | CURRENT_ROLE
   </para>
 
   <para>
-   The <xref linkend="sql-reassign-owned"/> command is an alternative that
+   The <link linkend="sql-reassign-owned"><command>REASSIGN OWNED</command></link> command is an alternative that
    reassigns the ownership of all the database objects owned by one or
    more roles.  However, <command>REASSIGN OWNED</command> does not deal with
    privileges for other objects.
index 13079f3e1f4af2f248e14a45c39b7665fd5b8c6f..13dc1cc64998a2c00cb7193213c0a15ebaf18b1b 100644 (file)
@@ -40,7 +40,9 @@ DROP ROLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...
    of the cluster; an error will be raised if so.  Before dropping the role,
    you must drop all the objects it owns (or reassign their ownership)
    and revoke any privileges the role has been granted on other objects.
-   The <xref linkend="sql-reassign-owned"/> and <xref linkend="sql-drop-owned"/>
+   The <link linkend="sql-reassign-owned"><command>REASSIGN
+   OWNED</command></link> and <link linkend="sql-drop-owned"><command>DROP
+   OWNED</command></link>
    commands can be useful for this purpose; see <xref linkend="role-removal"/>
    for more discussion.
   </para>
index bf8996d19858b76382d5db3576dd6fd4ee331605..450458fd2a42d771295d257f5c9fab74e9c04487 100644 (file)
@@ -32,8 +32,8 @@ DROP TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ..
    <command>DROP TABLE</command> removes tables from the database.
    Only the table owner, the schema owner, and superuser can drop a
    table.  To empty a table of rows
-   without destroying the table, use <xref linkend="sql-delete"/>
-   or <xref linkend="sql-truncate"/>.
+   without destroying the table, use <link linkend="sql-delete"><command>DELETE</command></link>
+   or <link linkend="sql-truncate"><command>TRUNCATE</command></link>.
   </para>
 
   <para>
index 37ab856125d10a35ad9957557a5bcee00b03ebb3..74e736b0ebd8eac5fd75feb1b1dad7480a41b119 100644 (file)
@@ -30,7 +30,7 @@ DROP USER [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...
 
   <para>
    <command>DROP USER</command> is simply an alternate spelling of
-   <xref linkend="sql-droprole"/>.
+   <link linkend="sql-droprole"><command>DROP ROLE</command></link>.
   </para>
  </refsect1>
 
index ded85b0e232dfd05f949bd213307cc340287d498..fe523a2ee1d340bcd30108dcc61f568f3efae166 100644 (file)
@@ -41,7 +41,7 @@ PostgreSQL documentation
 
   <para>
    <application>dropdb</application> is a wrapper around the
-   <acronym>SQL</acronym> command <xref linkend="sql-dropdatabase"/>.
+   <acronym>SQL</acronym> command <link linkend="sql-dropdatabase"><command>DROP DATABASE</command></link>.
    There is no effective difference between dropping databases via
    this utility and via other methods for accessing the server.
   </para>
index f9aab340d3bad8ad15f89b421643bdeb135ddf8e..81580507e826807ac2c834754b6da9657d870435 100644 (file)
@@ -42,7 +42,7 @@ PostgreSQL documentation
 
   <para>
    <application>dropuser</application> is a wrapper around the
-   <acronym>SQL</acronym> command <xref linkend="sql-droprole"/>.
+   <acronym>SQL</acronym> command <link linkend="sql-droprole"><command>DROP ROLE</command></link>.
    There is no effective difference between dropping users via
    this utility and via other methods for accessing the server.
   </para>
index 8b8f4f0dbb9fce74783da9baf17ecac0244e8587..498652919ad8327d723d0a7be790fc23a58c23d9 100644 (file)
@@ -33,7 +33,7 @@ END [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
    made by the transaction become visible to others and are guaranteed
    to be durable if a crash occurs.  This command is a
    <productname>PostgreSQL</productname> extension
-   that is equivalent to <xref linkend="sql-commit"/>.
+   that is equivalent to <link linkend="sql-commit"><command>COMMIT</command></link>.
   </para>
  </refsect1>
 
@@ -69,7 +69,7 @@ END [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-rollback"/> to
+   Use <link linkend="sql-rollback"><command>ROLLBACK</command></link> to
    abort a transaction.
   </para>
 
@@ -94,8 +94,8 @@ END;
 
   <para>
    <command>END</command> is a <productname>PostgreSQL</productname>
-   extension that provides functionality equivalent to <xref
-   linkend="sql-commit"/>, which is
+   extension that provides functionality equivalent to <link
+   linkend="sql-commit"><command>COMMIT</command></link>, which is
    specified in the SQL standard.
   </para>
  </refsect1>
index 906b2ccd50a2f3a2ba218e8ea69403ebe25001bc..b0ccdd26e7306b96257725a0bf7d0338372a8ab4 100644 (file)
@@ -302,7 +302,7 @@ ROLLBACK;
    the <link linkend="autovacuum">autovacuum daemon</link> will take care
    of that automatically.  But if a table has recently had substantial
    changes in its contents, you might need to do a manual
-   <xref linkend="sql-analyze"/> rather than wait for autovacuum to catch up
+   <link linkend="sql-analyze"><command>ANALYZE</command></link> rather than wait for autovacuum to catch up
    with the changes.
   </para>
 
index e802be61c8c6dd81d550f636edf42edecced072e..ec843f56844299e0a000800c14b14d46a776885c 100644 (file)
@@ -335,9 +335,9 @@ FETCH <replaceable class="parameter">count</replaceable>
   </para>
 
   <para>
-   <xref linkend="sql-declare"/>
+   <link linkend="sql-declare"><command>DECLARE</command></link>
    is used to define a cursor.  Use
-   <xref linkend="sql-move"/>
+   <link linkend="sql-move"><command>MOVE</command></link>
    to change cursor position without retrieving data.
   </para>
  </refsect1>
index fe231aa30cd663ac2b088a9f2e427c5fe0dd68e7..c3db393bdea70278dc1b8ace5b5a7bbf0134da14 100644 (file)
@@ -259,7 +259,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace
   <title>Notes</title>
 
    <para>
-    The <xref linkend="sql-revoke"/> command is used
+    The <link linkend="sql-revoke"><command>REVOKE</command></link> command is used
     to revoke access privileges.
    </para>
 
index 0c4688603d9f9c251b7540390f0b5aee579f8b74..4cdfae2279e3e80d32bdc86f061fc44cf91ddbfa 100644 (file)
@@ -186,9 +186,9 @@ LOCK [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [ * ]
     <productname>PostgreSQL</productname> reports an error if <command>LOCK</command>
     is used outside a transaction block.
     Use
-    <xref linkend="sql-begin"/> and
-    <xref linkend="sql-commit"/>
-    (or <xref linkend="sql-rollback"/>)
+    <link linkend="sql-begin"><command>BEGIN</command></link> and
+    <link linkend="sql-commit"><command>COMMIT</command></link>
+    (or <link linkend="sql-rollback"><command>ROLLBACK</command></link>)
     to define a transaction block.
    </para>
 
index 806949df42b75beb561cce221c50c1196077ca50..fda678e345c846478473fc092ae5bc320ec899c2 100644 (file)
@@ -143,8 +143,8 @@ PostgreSQL documentation
        <para>
         This option is meant for other programs that interact with a server
         instance, such as <xref linkend="app-pg-ctl"/>, to query configuration
-        parameter values.  User-facing applications should instead use <xref
-        linkend="sql-show"/> or the <structname>pg_settings</structname> view.
+        parameter values.  User-facing applications should instead use <link
+        linkend="sql-show"><command>SHOW</command></link> or the <structname>pg_settings</structname> view.
        </para>
       </listitem>
      </varlistentry>
index 1e484f6d2021fba5b9afdc4594837fb2b18374ef..57a34ff83c792109f98d19df4b1c30e298166bdc 100644 (file)
@@ -66,7 +66,7 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class
    also means that a single  prepared statement cannot be used by
    multiple simultaneous database clients; however, each client can create
    their own prepared statement to use.  Prepared statements can be
-   manually cleaned up using the <xref linkend="sql-deallocate"/> command.
+   manually cleaned up using the <link linkend="sql-deallocate"><command>DEALLOCATE</command></link> command.
   </para>
 
   <para>
@@ -163,7 +163,7 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class
 
   <para>
    To examine the query plan <productname>PostgreSQL</productname> is using
-   for a prepared statement, use <xref linkend="sql-explain"/>, for example
+   for a prepared statement, use <link linkend="sql-explain"><command>EXPLAIN</command></link>, for example
 <programlisting>
 EXPLAIN EXECUTE <replaceable>name</replaceable>(<replaceable>parameter_values</replaceable>);
 </programlisting>
index 18051983e160b79dc6b52339af9332aaeacaf1f2..f4f6118ac31659c96b664b146b31219a8fd93d1e 100644 (file)
@@ -39,8 +39,8 @@ PREPARE TRANSACTION <replaceable class="parameter">transaction_id</replaceable>
 
   <para>
    Once prepared, a transaction can later be committed or rolled back
-   with <xref linkend="sql-commit-prepared"/>
-   or <xref linkend="sql-rollback-prepared"/>,
+   with <link linkend="sql-commit-prepared"><command>COMMIT PREPARED</command></link>
+   or <link linkend="sql-rollback-prepared"><command>ROLLBACK PREPARED</command></link>,
    respectively.  Those commands can be issued from any session, not
    only the one that executed the original transaction.
   </para>
@@ -92,8 +92,8 @@ PREPARE TRANSACTION <replaceable class="parameter">transaction_id</replaceable>
   </para>
 
   <para>
-   This command must be used inside a transaction block. Use <xref
-   linkend="sql-begin"/> to start one.
+   This command must be used inside a transaction block. Use <link
+   linkend="sql-begin"><command>BEGIN</command></link> to start one.
   </para>
 
   <para>
index aed051f543c0110fd0f2655cd266909b51e00bad..ee3fc0957798853395d1a19e38ee58d40a90e7af 100644 (file)
@@ -756,8 +756,8 @@ testdb=&gt;
     <para>
     Whenever a command is executed, <application>psql</application> also polls
     for asynchronous notification events generated by
-    <xref linkend="sql-listen"/> and
-    <xref linkend="sql-notify"/>.
+    <link linkend="sql-listen"><command>LISTEN</command></link> and
+    <link linkend="sql-notify"><command>NOTIFY</command></link>.
     </para>
 
     <para>
@@ -993,7 +993,7 @@ testdb=&gt;
         <listitem>
         <para>
         Performs a frontend (client) copy. This is an operation that
-        runs an <acronym>SQL</acronym> <xref linkend="sql-copy"/>
+        runs an <acronym>SQL</acronym> <link linkend="sql-copy"><command>COPY</command></link>
         command, but instead of the server
         reading or writing the specified file,
         <application>psql</application> reads or writes the file and
@@ -1030,9 +1030,9 @@ testdb=&gt;
 
         <para>
         The syntax of this command is similar to that of the
-        <acronym>SQL</acronym> <xref linkend="sql-copy"/>
+        <acronym>SQL</acronym> <link linkend="sql-copy"><command>COPY</command></link>
         command.  All options other than the data source/destination are
-        as specified for <xref linkend="sql-copy"/>.
+        as specified for <command>COPY</command>.
         Because of this, special parsing rules apply to the <command>\copy</command>
         meta-command.  Unlike most other meta-commands, the entire remainder
         of the line is always taken to be the arguments of <command>\copy</command>,
@@ -1397,8 +1397,8 @@ testdb=&gt;
         </para>
 
         <para>
-        Descriptions for objects can be created with the <xref
-        linkend="sql-comment"/>
+        Descriptions for objects can be created with the <link
+        linkend="sql-comment"><command>COMMENT</command></link>
         <acronym>SQL</acronym> command.
        </para>
         </listitem>
@@ -1435,9 +1435,9 @@ testdb=&gt;
         </para>
 
         <para>
-        The <xref linkend="sql-alterdefaultprivileges"/> command is used to set
-        default access privileges.  The meaning of the
-        privilege display is explained in
+        The <link linkend="sql-alterdefaultprivileges"><command>ALTER DEFAULT
+        PRIVILEGES</command></link> command is used to set default access
+        privileges.  The meaning of the privilege display is explained in
         <xref linkend="ddl-priv"/>.
         </para>
         </listitem>
@@ -1751,8 +1751,8 @@ testdb=&gt;
         </para>
 
         <para>
-        The <xref linkend="sql-grant"/> and
-        <xref linkend="sql-revoke"/>
+        The <link linkend="sql-grant"><command>GRANT</command></link> and
+        <link linkend="sql-revoke"><command>REVOKE</command></link>
         commands are used to set access privileges.  The meaning of the
         privilege display is explained in
         <xref linkend="ddl-priv"/>.
@@ -1807,8 +1807,8 @@ testdb=&gt;
         </para>
 
         <para>
-        The <xref linkend="sql-alterrole"/> and
-        <xref linkend="sql-alterdatabase"/>
+        The <link linkend="sql-alterrole"><command>ALTER ROLE</command></link> and
+        <link linkend="sql-alterdatabase"><command>ALTER DATABASE</command></link>
         commands are used to define per-role and per-database configuration
         settings.
         </para>
@@ -3179,7 +3179,7 @@ lo_import 152801
         <note>
         <para>
         This command is unrelated to the <acronym>SQL</acronym>
-        command <xref linkend="sql-set"/>.
+        command <link linkend="sql-set"><command>SET</command></link>.
         </para>
         </note>
         </listitem>
index 783389df4e8d150c6efcf66bc9cf033762d47a09..ab692bd06908b34334a75790739b667e0dc35c98 100644 (file)
@@ -82,7 +82,7 @@ REASSIGN OWNED BY { <replaceable class="parameter">old_role</replaceable> | CURR
   </para>
 
   <para>
-   The <xref linkend="sql-drop-owned"/> command is an alternative that
+   The <link linkend="sql-drop-owned"><command>DROP OWNED</command></link> command is an alternative that
    simply drops all the database objects owned by one or more roles.
   </para>
 
index 8ae62671adab9afffa716840982266228ebe5606..3bf888444782f424dfa88dbca06fcdb1ce9cc58e 100644 (file)
@@ -94,7 +94,7 @@ REFRESH MATERIALIZED VIEW [ CONCURRENTLY ] <replaceable class="parameter">name</
 
   <para>
    While the default index for future
-   <xref linkend="sql-cluster"/>
+   <link linkend="sql-cluster"><command>CLUSTER</command></link>
    operations is retained, <command>REFRESH MATERIALIZED VIEW</command> does not
    order the generated rows based on this property. If you want the data
    to be ordered upon generation, you must use an <literal>ORDER BY</literal>
index 0f3f12bfbfc65fb31a4022c52b40a86693a87064..a6d93693c5d41f2e307cb8e3fe1767525ce2e108 100644 (file)
@@ -93,7 +93,7 @@ PostgreSQL documentation
 
   <para>
    <application>reindexdb</application> is a wrapper around the SQL
-   command <xref linkend="sql-reindex"/>.
+   command <link linkend="sql-reindex"><command>REINDEX</command></link>.
    There is no effective difference between reindexing databases via
    this utility and via other methods for accessing the server.
   </para>
index b50f99dfe7141166b2aa371a93d56fb05316113c..35ff87a4f5e26c5a8bc30c8fe50d5c0df6e127e7 100644 (file)
@@ -131,7 +131,7 @@ REVOKE [ ADMIN OPTION FOR ]
   </para>
 
   <para>
-   See the description of the <xref linkend="sql-grant"/> command for
+   See the description of the <link linkend="sql-grant"><command>GRANT</command></link> command for
    the meaning of the privilege types.
   </para>
 
@@ -292,7 +292,7 @@ REVOKE admins FROM joe;
   <title>Compatibility</title>
 
    <para>
-    The compatibility notes of the <xref linkend="sql-grant"/> command
+    The compatibility notes of the <link linkend="sql-grant"><command>GRANT</command></link> command
     apply analogously to <command>REVOKE</command>.
     The keyword <literal>RESTRICT</literal> or <literal>CASCADE</literal>
     is required according to the standard, but <productname>PostgreSQL</productname>
index 1357eaa8323ace8b6bb66654b6b9e4df4a425832..142f71e77425d5e3ab725c0c5625b5292c8b3726 100644 (file)
@@ -70,7 +70,7 @@ ROLLBACK [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-commit"/> to
+   Use <link linkend="sql-commit"><command>COMMIT</command></link> to
    successfully terminate a transaction.
   </para>
 
index 4d5647a302e2a8cfc712712d20af25389cca7b65..3d5a241e1aa981be0619af4846bd21622f1c4428 100644 (file)
@@ -64,7 +64,7 @@ ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] <replaceable>savepoint_name</re
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-release-savepoint"/> to destroy a savepoint
+   Use <link linkend="sql-release-savepoint"><command>RELEASE SAVEPOINT</command></link> to destroy a savepoint
    without discarding the effects of commands executed after it was
    established.
   </para>
index 87243b1d2046f1d7acb06da371fae92eac0d233b..b17342a1ee6a55c4a3d18d30ef7203ad54d2e7ae 100644 (file)
@@ -64,8 +64,8 @@ SAVEPOINT <replaceable>savepoint_name</replaceable>
   <title>Notes</title>
 
   <para>
-   Use <xref linkend="sql-rollback-to"/> to
-   rollback to a savepoint.  Use <xref linkend="sql-release-savepoint"/>
+   Use <link linkend="sql-rollback-to"><command>ROLLBACK TO</command></link> to
+   rollback to a savepoint.  Use <link linkend="sql-release-savepoint"><command>RELEASE SAVEPOINT</command></link>
    to destroy a savepoint, keeping
    the effects of commands executed after it was established.
   </para>
index b93e4ca208b1f703ce59b2d33d816d9c5b044ac9..b4dea9b6acf45683ee31353b9bffb38d51636032 100644 (file)
@@ -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) &mdash; 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>
index b1af52a4da127048f0043bd70251f6a610bee1f5..6cfa706b575220d9883fa252ce2715940dcc6079 100644 (file)
@@ -95,7 +95,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
   <title>Notes</title>
 
   <para>
-   <xref linkend="sql-createtableas"/> is functionally similar to
+   <link linkend="sql-createtableas"><command>CREATE TABLE AS</command></link> is functionally similar to
    <command>SELECT INTO</command>.  <command>CREATE TABLE AS</command>
    is the recommended syntax, since this form of <command>SELECT
    INTO</command> is not available in <application>ECPG</application>
@@ -109,8 +109,8 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
    In contrast to <command>CREATE TABLE AS</command>, <command>SELECT
    INTO</command> does not allow to specify properties like a table's access
    method with <xref linkend="sql-createtable-method" /> or the table's
-   tablespace with <xref linkend="sql-createtable-tablespace" />. Use <xref
-   linkend="sql-createtableas"/> if necessary.  Therefore, the default table
+   tablespace with <xref linkend="sql-createtable-tablespace" />. Use
+   <command>CREATE TABLE AS</command> if necessary.  Therefore, the default table
    access method is chosen for the new table. See <xref
    linkend="guc-default-table-access-method"/> for more information.
   </para>
index a4842f363c8be325f3955e59adaded43e6752e0d..739f2c5cdfa5c4dcb57467f7a39e4b0b632a8913 100644 (file)
@@ -48,7 +48,7 @@ RESET ROLE
 
   <para>
    The <literal>SESSION</literal> and <literal>LOCAL</literal> modifiers act the same
-   as for the regular <xref linkend="sql-set"/>
+   as for the regular <link linkend="sql-set"><command>SET</command></link>
    command.
   </para>
 
@@ -82,7 +82,7 @@ RESET ROLE
 
   <para>
    <command>SET ROLE</command> has effects comparable to
-   <xref linkend="sql-set-session-authorization"/>, but the privilege
+   <link linkend="sql-set-session-authorization"><command>SET SESSION AUTHORIZATION</command></link>, but the privilege
    checks involved are quite different.  Also,
    <command>SET SESSION AUTHORIZATION</command> determines which roles are
    allowable for later <command>SET ROLE</command> commands, whereas changing
@@ -92,7 +92,7 @@ RESET ROLE
 
   <para>
    <command>SET ROLE</command> does not process session variables as specified by
-   the role's <xref linkend="sql-alterrole"/> settings;  this only happens during
+   the role's <link linkend="sql-alterrole"><command>ALTER ROLE</command></link> settings;  this only happens during
    login.
   </para>
 
index 6a838e58b7643b98764b2e9ae2776c9ac02bf402..e44e78ed8d67e2b209170ca9d796ed11ef7b0054 100644 (file)
@@ -45,7 +45,7 @@ RESET SESSION AUTHORIZATION
    identifier is normally equal to the session user identifier, but
    might change temporarily in the context of <literal>SECURITY DEFINER</literal>
    functions and similar mechanisms; it can also be changed by
-   <xref linkend="sql-set-role"/>.
+   <link linkend="sql-set-role"><command>SET ROLE</command></link>.
    The current user identifier is relevant for permission checking.
   </para>
 
@@ -58,7 +58,7 @@ RESET SESSION AUTHORIZATION
 
   <para>
    The <literal>SESSION</literal> and <literal>LOCAL</literal> modifiers act the same
-   as for the regular <xref linkend="sql-set"/>
+   as for the regular <link linkend="sql-set"><command>SET</command></link>
    command.
   </para>
 
index d6cd1d41779216ea600faf9501805dae6344e392..74ccd7e3456cde80aa5b865bddc90ba7be1d4ef5 100644 (file)
@@ -37,8 +37,8 @@ START TRANSACTION [ <replaceable class="parameter">transaction_mode</replaceable
   <para>
    This command begins a new transaction block. If the isolation level,
    read/write mode, or deferrable mode is specified, the new transaction has those
-   characteristics, as if <xref linkend="sql-set-transaction"/> was executed. This is the same
-   as the <xref linkend="sql-begin"/> command.
+   characteristics, as if <link linkend="sql-set-transaction"><command>SET TRANSACTION</command></link> was executed. This is the same
+   as the <link linkend="sql-begin"><command>BEGIN</command></link> command.
   </para>
  </refsect1>
 
index 766c6882bd4caf1364e28810800768fb2760afdd..6dcdab9cafd68e7d9799acc72016d96705f14796 100644 (file)
@@ -62,7 +62,7 @@ PostgreSQL documentation
 
   <para>
    <application>vacuumdb</application> is a wrapper around the SQL
-   command <xref linkend="sql-vacuum"/>.
+   command <link linkend="sql-vacuum"><command>VACUUM</command></link>.
    There is no effective difference between vacuuming and analyzing
    databases via this utility and via other methods for accessing the
    server.
index 9961569afc8aed76bc56ae2514e75b7414ed2107..e896a44ce59173f4821b4ef300c5c3fc4e81a16f 100644 (file)
@@ -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>
 
index 071ff301d07b66693de7545acfae4794263f78f5..d960aa3e0fbc68b5789a87e4afaf689b89d939dd 100644 (file)
@@ -10,7 +10,7 @@
  <para>
   The <filename>tsm_system_rows</filename> module provides the table sampling method
   <literal>SYSTEM_ROWS</literal>, which can be used in
-  the <literal>TABLESAMPLE</literal> clause of a <xref linkend="sql-select"/>
+  the <literal>TABLESAMPLE</literal> clause of a <link linkend="sql-select"><command>SELECT</command></link>
   command.
  </para>
 
index cd074926d85a592ba4eaeef835b363f8ee5b9141..df6e83a9236ea4e88a857b28e6a97763956ee761 100644 (file)
@@ -10,7 +10,7 @@
  <para>
   The <filename>tsm_system_time</filename> module provides the table sampling method
   <literal>SYSTEM_TIME</literal>, which can be used in
-  the <literal>TABLESAMPLE</literal> clause of a <xref linkend="sql-select"/>
+  the <literal>TABLESAMPLE</literal> clause of a <link linkend="sql-select"><command>SELECT</command></link>
   command.
  </para>
 
index 829decd883904ffd1978d5506b17661fb234b652..cc082521a2ae6f06f5396a09ed7acb72e0b320d0 100644 (file)
@@ -51,8 +51,8 @@
    operating system users. In practice it might be convenient to
    maintain a correspondence, but this is not required. Database roles
    are global across a database cluster installation (and not
-   per individual database). To create a role use the <xref
-   linkend="sql-createrole"/> SQL command:
+   per individual database). To create a role use the <link
+   linkend="sql-createrole"><command>CREATE ROLE</command></link> SQL command:
 <synopsis>
 CREATE ROLE <replaceable>name</replaceable>;
 </synopsis>
@@ -61,7 +61,7 @@ CREATE ROLE <replaceable>name</replaceable>;
    double-quoted.  (In practice, you will usually want to add additional
    options, such as <literal>LOGIN</literal>, to the command.  More details appear
    below.)  To remove an existing role, use the analogous
-   <xref linkend="sql-droprole"/> command:
+   <link linkend="sql-droprole"><command>DROP ROLE</command></link> command:
 <synopsis>
 DROP ROLE <replaceable>name</replaceable>;
 </synopsis>
@@ -303,8 +303,8 @@ CREATE ROLE <replaceable>name</replaceable>;
 
   <para>
    Once the group role exists, you can add and remove members using the
-   <xref linkend="sql-grant"/> and
-   <xref linkend="sql-revoke"/> commands:
+   <link linkend="sql-grant"><command>GRANT</command></link> and
+   <link linkend="sql-revoke"><command>REVOKE</command></link> commands:
 <synopsis>
 GRANT <replaceable>group_role</replaceable> TO <replaceable>role1</replaceable>, ... ;
 REVOKE <replaceable>group_role</replaceable> FROM <replaceable>role1</replaceable>, ... ;
@@ -319,7 +319,7 @@ REVOKE <replaceable>group_role</replaceable> FROM <replaceable>role1</replaceabl
   <para>
    The members of a group role can use the privileges of the role in two
    ways.  First, every member of a group can explicitly do
-   <xref linkend="sql-set-role"/> to
+   <link linkend="sql-set-role"><command>SET ROLE</command></link> to
    temporarily <quote>become</quote> the group role.  In this state, the
    database session has access to the privileges of the group role rather
    than the original login role, and any database objects created are
@@ -402,8 +402,8 @@ RESET ROLE;
   </para>
 
   <para>
-   To destroy a group role, use <xref
-   linkend="sql-droprole"/>:
+   To destroy a group role, use <link
+   linkend="sql-droprole"><command>DROP ROLE</command></link>:
 <synopsis>
 DROP ROLE <replaceable>name</replaceable>;
 </synopsis>
@@ -418,7 +418,7 @@ DROP ROLE <replaceable>name</replaceable>;
   <para>
    Because roles can own database objects and can hold privileges
    to access other objects, dropping a role is often not just a matter of a
-   quick <xref linkend="sql-droprole"/>.  Any objects owned by the role must
+   quick <link linkend="sql-droprole"><command>DROP ROLE</command></link>.  Any objects owned by the role must
    first be dropped or reassigned to other owners; and any permissions
    granted to the role must be revoked.
   </para>
@@ -429,7 +429,7 @@ DROP ROLE <replaceable>name</replaceable>;
 <programlisting>
 ALTER TABLE bobs_table OWNER TO alice;
 </programlisting>
-   Alternatively, the <xref linkend="sql-reassign-owned"/> command can be
+   Alternatively, the <link linkend="sql-reassign-owned"><command>REASSIGN OWNED</command></link> command can be
    used to reassign ownership of all objects owned by the role-to-be-dropped
    to a single other role.  Because <command>REASSIGN OWNED</command> cannot access
    objects in other databases, it is necessary to run it in each database
@@ -442,7 +442,7 @@ ALTER TABLE bobs_table OWNER TO alice;
   <para>
    Once any valuable objects have been transferred to new owners, any
    remaining objects owned by the role-to-be-dropped can be dropped with
-   the <xref linkend="sql-drop-owned"/> command.  Again, this command cannot
+   the <link linkend="sql-drop-owned"><command>DROP OWNED</command></link> command.  Again, this command cannot
    access objects in other databases, so it is necessary to run it in each
    database that contains objects owned by the role.  Also, <command>DROP
    OWNED</command> will not drop entire databases or tablespaces, so it is
@@ -598,7 +598,7 @@ DROP ROLE doomed_role;
 
   <para>
    Administrators can grant access to these roles to users using the
-   <xref linkend="sql-grant"/> command, for example:
+   <link linkend="sql-grant"><command>GRANT</command></link> command, for example:
 
 <programlisting>
 GRANT pg_signal_backend TO admin_user;
index f035866848c85371d648e1e93c7c67d40b5fdf33..36c2d21101b9f7c57a02d929b6d6d4fada31ee51 100644 (file)
@@ -490,7 +490,7 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households;
    Also, because the final function performs the sort, it is not possible
    to continue adding input rows by executing the transition function again
    later.  This means the final function is not <literal>READ_ONLY</literal>;
-   it must be declared in <xref linkend="sql-createaggregate"/>
+   it must be declared in <link linkend="sql-createaggregate"><command>CREATE AGGREGATE</command></link>
    as <literal>READ_WRITE</literal>, or as <literal>SHAREABLE</literal> if
    it's possible for additional final-function calls to make use of the
    already-sorted state.
index 0f60a4a0ab6ddcf614aed59028d33c375fa68718..8c74c11d3b599efa4c49ec195b9efa254188ccab 100644 (file)
@@ -85,7 +85,7 @@
     that a procedure does not return a value, so there is no return type
     declaration.  While a function is called as part of a query or DML
     command, a procedure is called in isolation using
-    the <xref linkend="sql-call"/> command.  If the CALL command is not
+    the <link linkend="sql-call"><command>CALL</command></link> command.  If the <command>CALL</command> command is not
     part of an explicit transaction, a procedure in many server-side
     languages can commit, rollback, and begin new transactions during
     its execution, which is not possible in functions.
    <para>
     The explanations on how to define user-defined functions in the rest of
     this chapter apply to procedures as well, except that
-    the <xref linkend="sql-createprocedure"/> command is used instead, there is
+    the <link linkend="sql-createprocedure"><command>CREATE PROCEDURE</command></link> command is used instead, there is
     no return type, and some other features such as strictness don't apply.
    </para>
 
    <para>
     Collectively, functions and procedures are also known
     as <firstterm>routines</firstterm><indexterm><primary>routine</primary></indexterm>.
-    There are commands such as <xref linkend="sql-alterroutine"/>
-    and <xref linkend="sql-droproutine"/> that can operate on functions and
+    There are commands such as <link linkend="sql-alterroutine"><command>ALTER ROUTINE</command></link>
+    and <link linkend="sql-droproutine"><command>DROP ROUTINE</command></link> that can operate on functions and
     procedures without having to know which kind it is.  Note, however, that
     there is no <literal>CREATE ROUTINE</literal> command.
    </para>
@@ -1531,7 +1531,7 @@ CREATE FUNCTION test(int, int) RETURNS int
     Every function has a <firstterm>volatility</firstterm> classification, with
     the possibilities being <literal>VOLATILE</literal>, <literal>STABLE</literal>, or
     <literal>IMMUTABLE</literal>.  <literal>VOLATILE</literal> is the default if the
-    <xref linkend="sql-createfunction"/>
+    <link linkend="sql-createfunction"><command>CREATE FUNCTION</command></link>
     command does not specify a category.  The volatility category is a
     promise to the optimizer about the behavior of the function:
 
@@ -3432,7 +3432,7 @@ if (!ptr)
 
    <para>
     Some basic facts can be supplied by declarative annotations provided in
-    the <xref linkend="sql-createfunction"/> command.  Most important of
+    the <link linkend="sql-createfunction"><command>CREATE FUNCTION</command></link> command.  Most important of
     these is the function's <link linkend="xfunc-volatility">volatility
     category</link> (<literal>IMMUTABLE</literal>, <literal>STABLE</literal>,
     or <literal>VOLATILE</literal>); one should always be careful to
index 7f1409305629c297c24c1f5f3b728033f993d848..31d403c4806b74f1c30f1901e1d8f70fb4b11691 100644 (file)
@@ -103,7 +103,7 @@ CREATE FUNCTION <replaceable>handler_function_name</replaceable>()
      <para>
       Optionally, the language handler can provide an <quote>inline</quote>
       handler function that executes anonymous code blocks
-      (<xref linkend="sql-do"/> commands)
+      (<link linkend="sql-do"><command>DO</command></link> commands)
       written in this language.  If an inline handler function
       is provided by the language, declare it with a command like
 <synopsis>