From: Tom Lane Date: Mon, 11 May 2020 18:15:49 +0000 (-0400) Subject: Doc: fix "Unresolved ID reference" warnings, clean up man page cross-refs. X-Git-Url: http://git.postgresql.org/gitweb/-?a=commitdiff_plain;h=60c90c16c1885bb9aa2047b66f958b865c5d397e;p=users%2Frhaas%2Fpostgres.git Doc: fix "Unresolved ID reference" warnings, clean up man page cross-refs. Use xreflabel attributes instead of endterm attributes to control the appearance of links to subsections of SQL command reference pages. This is simpler, it matches what we do elsewhere (e.g. for GUC variables), and it doesn't draw "Unresolved ID reference" warnings from the PDF toolchain. Fix some places where the text was absolutely dependent on an rendering exactly so, by using a around the required text instead. At least one of those spots had already been turned into bad grammar by subsequent changes, and the whole idea is just too fragile for my taste. does NOT have fixed output, don't write as if it does. Consistently include a page-level link in cross-man-page references, because otherwise they are useless/nonsensical in man-page output. Likewise, be consistent about mentioning "below" or "above" in same-page references; we were doing that in about 90% of the cases, but now it's 100%. Also get rid of another nonfunctional-in-PDF idea, of making cross-references to functions by sticking ID tags on constructs. We can put the IDs on s instead --- which is probably not any more sensible in abstract terms, but it works where the other doesn't. (There is talk of attaching cross-reference IDs to most or all of the docs' function descriptions, but for now I just fixed the two that exist.) Discussion: https://postgr.es/m/14480.1589154358@sss.pgh.pa.us --- diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 3aea1763b4..9f2a4a2470 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -7301,8 +7301,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; These settings control the behavior of the autovacuum feature. Refer to for more information. Note that many of these settings can be overridden on a per-table - basis; see . + basis; see . diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index d9b3598977..7c06afd3ea 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -4355,9 +4355,9 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); - + - + encode encode ( bytes bytea, @@ -4377,9 +4377,9 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three'); - + - + decode decode ( string text, diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml index 1be209a2fe..98d7a238de 100644 --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -98,8 +98,7 @@ CREATE INDEX test1_id_index ON test1 (id); In production environments this is often unacceptable. It is possible to allow writes to occur in parallel with index creation, but there are several caveats to be aware of — - for more information see . + for more information see . diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index a0e0f34c25..39075ea8f3 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -827,8 +827,7 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu The default thresholds and scale factors are taken from postgresql.conf, but it is possible to override them (and many other autovacuum control parameters) on a per-table basis; see - for more information. + for more information. If a setting has been changed via a table's storage parameters, that value is used when processing that table; otherwise the global settings are used. See for more details on diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml index 22252556be..572e968273 100644 --- a/doc/src/sgml/queries.sgml +++ b/doc/src/sgml/queries.sgml @@ -110,7 +110,7 @@ SELECT random(); The <literal>FROM</literal> Clause - The derives a + The FROM clause derives a table from one or more other tables given in a comma-separated table reference list. @@ -907,8 +907,8 @@ WHERE pname IS NULL; - The syntax of the is + The syntax of the WHERE + clause is WHERE search_condition @@ -1014,7 +1014,7 @@ SELECT select_list - The is + The GROUP BY clause is used to group together those rows in a table that have the same values in all the columns listed. The order in which the columns are listed does not matter. The effect is to combine each set diff --git a/doc/src/sgml/ref/alter_collation.sgml b/doc/src/sgml/ref/alter_collation.sgml index 4cfcb42251..56f94627c6 100644 --- a/doc/src/sgml/ref/alter_collation.sgml +++ b/doc/src/sgml/ref/alter_collation.sgml @@ -93,16 +93,15 @@ ALTER COLLATION name SET SCHEMA new_sche Update the collation's version. - See below. + See below. - - Notes + + Notes When using collations provided by the ICU library, the ICU-specific version diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 6563bd5ab2..cbfb4828e5 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -405,8 +405,7 @@ WITH ( MODULUS numeric_literal, REM database will not assume that the constraint holds for all rows in the table, until it is validated by using the VALIDATE CONSTRAINT option. - See below for more information + See below for more information about using the NOT VALID option. @@ -504,9 +503,8 @@ WITH ( MODULUS numeric_literal, REM previously created as NOT VALID, by scanning the table to ensure there are no rows for which the constraint is not satisfied. Nothing happens if the constraint is already marked valid. - (See below for an explanation of the - usefulness of this command.) + (See below for an explanation + of the usefulness of this command.) @@ -708,8 +706,8 @@ WITH ( MODULUS numeric_literal, REM This form changes one or more storage parameters for the table. See - + in the + 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. @@ -1210,8 +1208,8 @@ WITH ( MODULUS numeric_literal, REM - - Notes + + Notes The key word COLUMN is noise and can be omitted. diff --git a/doc/src/sgml/ref/create_aggregate.sgml b/doc/src/sgml/ref/create_aggregate.sgml index 644657dd5e..811e288ec1 100644 --- a/doc/src/sgml/ref/create_aggregate.sgml +++ b/doc/src/sgml/ref/create_aggregate.sgml @@ -434,8 +434,8 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; This option specifies whether the final function is a pure function that does not modify its arguments. READ_ONLY indicates it does not; the other two values indicate that it may change the - transition state value. See below for more detail. The + transition state value. See + below for more detail. The default is READ_ONLY, except for ordered-set aggregates, for which the default is READ_WRITE. @@ -664,8 +664,8 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; - - Notes + + Notes In parameters that specify support function names, you can write diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index aaf087e2e3..ff87b2d28f 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -126,8 +126,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] . + — see below. For temporary tables, CREATE INDEX is always @@ -337,7 +336,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] The name of an index-method-specific storage parameter. See - + below for details. @@ -366,8 +365,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] - - Index Storage Parameters + + Index Storage Parameters The optional WITH clause specifies storage @@ -559,8 +558,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] - - Building Indexes Concurrently + + Building Indexes Concurrently index @@ -688,7 +687,7 @@ Indexes: - An operator class with its optional parameters + An operator class with optional parameters can be specified for each column of an index. The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on diff --git a/doc/src/sgml/ref/create_materialized_view.sgml b/doc/src/sgml/ref/create_materialized_view.sgml index ec8847ed40..de9f17655c 100644 --- a/doc/src/sgml/ref/create_materialized_view.sgml +++ b/doc/src/sgml/ref/create_materialized_view.sgml @@ -106,8 +106,9 @@ CREATE MATERIALIZED VIEW [ IF NOT EXISTS ] table_name This clause specifies optional storage parameters for the new - materialized view; see for more + materialized view; see + in the + documentation for more information. All parameters supported for CREATE TABLE are also supported for CREATE MATERIALIZED VIEW. diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index c49c770dd0..849f7e931f 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -192,8 +192,7 @@ WITH ( MODULUS numeric_literal, REM can be written before TEMPORARY or TEMP. This presently makes no difference in PostgreSQL and is deprecated; see - . + below. @@ -1201,8 +1200,7 @@ WITH ( MODULUS numeric_literal, REM This clause specifies optional storage parameters for a table or index; - see for more + see below for more information. For backward-compatibility the WITH clause for a table can also include OIDS=FALSE to specify that rows of the new table should not contain OIDs (object @@ -1302,8 +1300,8 @@ WITH ( MODULUS numeric_literal, REM - - Storage Parameters + + Storage Parameters storage parameters @@ -2063,8 +2061,8 @@ CREATE TABLE cities_partdef - - Compatibility + + Compatibility The CREATE TABLE command conforms to the diff --git a/doc/src/sgml/ref/create_table_as.sgml b/doc/src/sgml/ref/create_table_as.sgml index 56d06838f1..a4640929cf 100644 --- a/doc/src/sgml/ref/create_table_as.sgml +++ b/doc/src/sgml/ref/create_table_as.sgml @@ -140,8 +140,8 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI This clause specifies optional storage parameters for the new table; - see for more + see in the + documentation for more information. For backward-compatibility the WITH clause for a table can also include OIDS=FALSE to specify that rows of the new table should contain no OIDs (object diff --git a/doc/src/sgml/ref/declare.sgml b/doc/src/sgml/ref/declare.sgml index 34ca9df243..d6177dcd9c 100644 --- a/doc/src/sgml/ref/declare.sgml +++ b/doc/src/sgml/ref/declare.sgml @@ -99,8 +99,8 @@ DECLARE name [ BINARY ] [ INSENSITI NO SCROLL specifies that the cursor cannot be used to retrieve rows in a nonsequential fashion. The default is to allow scrolling in some cases; this is not the same as specifying - SCROLL. See for details. + SCROLL. See + below for details. @@ -139,8 +139,8 @@ DECLARE name [ BINARY ] [ INSENSITI - - Notes + + Notes Normal cursors return data in text format, the same as a diff --git a/doc/src/sgml/ref/delete.sgml b/doc/src/sgml/ref/delete.sgml index 08fb032b50..ec3c40df2e 100644 --- a/doc/src/sgml/ref/delete.sgml +++ b/doc/src/sgml/ref/delete.sgml @@ -122,8 +122,8 @@ DELETE FROM [ ONLY ] table_name [ * A table expression allowing columns from other tables to appear in the WHERE condition. This uses the same - syntax as the - of a SELECT statement; for example, an alias + syntax as the FROM + clause of a SELECT statement; for example, an alias for the table name can be specified. Do not repeat the target table as a from_item unless you wish to set up a self-join (in which case it must appear diff --git a/doc/src/sgml/ref/execute.sgml b/doc/src/sgml/ref/execute.sgml index aab1f4b7e0..1d887f3d17 100644 --- a/doc/src/sgml/ref/execute.sgml +++ b/doc/src/sgml/ref/execute.sgml @@ -94,9 +94,8 @@ EXECUTE name [ ( Examples - Examples are given in the section of the documentation. + Examples are given in + in the documentation. diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml index a6cec6b02e..2973b72b81 100644 --- a/doc/src/sgml/ref/insert.sgml +++ b/doc/src/sgml/ref/insert.sgml @@ -77,8 +77,7 @@ INSERT INTO table_name [ AS ON CONFLICT can be used to specify an alternative action to raising a unique constraint or exclusion constraint - violation error. (See below.) + violation error. (See below.) @@ -128,8 +127,8 @@ INSERT INTO table_name [ AS Parameters - - Inserting + + Inserting This section covers parameters that may be used when only @@ -315,8 +314,8 @@ INSERT INTO table_name [ AS - - <literal>ON CONFLICT</literal> Clause + + <literal>ON CONFLICT</literal> Clause UPSERT diff --git a/doc/src/sgml/ref/lock.sgml b/doc/src/sgml/ref/lock.sgml index a225cea63b..0c4688603d 100644 --- a/doc/src/sgml/ref/lock.sgml +++ b/doc/src/sgml/ref/lock.sgml @@ -202,9 +202,8 @@ LOCK [ TABLE ] [ ONLY ] name [ * ] LOCK TABLE is concerned, differing only in the rules about which modes conflict with which. For information on how to acquire an actual row-level lock, see - and the in the SELECT - reference documentation. + and + in the documentation. diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index a9bc397165..197b5c0d70 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -387,12 +387,12 @@ PostgreSQL documentation selected by writing multiple switches. The pattern parameter is interpreted as a pattern according to the same rules used by - psql's \d commands (see ), + psql's \d commands + (see below), so multiple schemas can also be selected by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent the shell from expanding the wildcards; see - . + below. @@ -524,12 +524,12 @@ PostgreSQL documentation can be selected by writing multiple switches. The pattern parameter is interpreted as a pattern according to the same rules used by - psql's \d commands (see ), + psql's \d commands + (see below), so multiple tables can also be selected by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent the shell from expanding the wildcards; see - . + below. @@ -777,12 +777,12 @@ PostgreSQL documentation switches. Also, the foreignserver parameter is interpreted as a pattern according to the same rules used by - psql's \d commands (see ), + psql's \d commands + (see below), so multiple foreign servers can also be selected by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent the shell from expanding the wildcards; see - . + below. The only exception is that an empty pattern is disallowed. @@ -1367,8 +1367,8 @@ CREATE DATABASE foo WITH TEMPLATE template0; - - Examples + + Examples To dump a database called mydb into a SQL-script file: @@ -1477,8 +1477,7 @@ CREATE DATABASE foo WITH TEMPLATE template0; To specify an upper-case or mixed-case name in and related switches, you need to double-quote the name; else it will be folded to - lower case (see ). But + lower case (see below). But double quotes are special to the shell, so in turn they must be quoted. Thus, to dump a single table with a mixed-case name, you need something like diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml index f0859896c5..40ca31bfdf 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -310,8 +310,7 @@ PostgreSQL documentation pattern parameter is interpreted as a pattern according to the same rules used by psql's \d - commands (see ), + commands (see below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion. diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml index 1a4b7c7825..5e5794bc90 100644 --- a/doc/src/sgml/ref/postgres-ref.sgml +++ b/doc/src/sgml/ref/postgres-ref.sgml @@ -530,8 +530,7 @@ PostgreSQL documentation The following options only apply to the single-user mode - (see ). + (see below). @@ -753,8 +752,8 @@ PostgreSQL documentation - - Single-User Mode + + Single-User Mode To start a single-user mode server, use a command like diff --git a/doc/src/sgml/ref/prepare.sgml b/doc/src/sgml/ref/prepare.sgml index 4e5e96a401..5ec86aee10 100644 --- a/doc/src/sgml/ref/prepare.sgml +++ b/doc/src/sgml/ref/prepare.sgml @@ -208,8 +208,8 @@ EXPLAIN EXECUTE name(parameter_values - - Examples + + Examples Create a prepared statement for an INSERT statement, and then execute it: diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index de303c8814..07bf272a20 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -809,7 +809,7 @@ testdb=> If an unquoted colon (:) followed by a psql variable name appears within an argument, it is replaced by the variable's value, as described in . + linkend="app-psql-interpolation"/> below. The forms :'variable_name' and :"variable_name" described there work as well. @@ -1163,8 +1163,7 @@ testdb=> also shown. For foreign tables, the associated foreign server is shown as well. (Matching the pattern is defined in - - below.) + below.) @@ -1946,9 +1945,8 @@ testdb=> - See under for how to configure and - customize your editor. + See , below, for how to + configure and customize your editor. @@ -2022,9 +2020,8 @@ Tue Oct 26 21:40:57 CEST 1999 - See under for how to configure and - customize your editor. + See , below, for how to + configure and customize your editor. @@ -2230,8 +2227,8 @@ CREATE INDEX Sends the current query buffer to the server and stores the - query's output into psql variables (see ). + query's output into psql variables + (see below). The query to be executed must return exactly one row. Each column of the row is stored into a separate variable, named the same as the column. For example: @@ -3078,8 +3075,7 @@ lo_import 152801 Illustrations of how these different formats look can be seen in - the section. + , below. @@ -3163,9 +3159,7 @@ lo_import 152801 Valid variable names can contain letters, digits, and - underscores. See the section below for details. + underscores. See below for details. Variable names are case-sensitive. @@ -3173,8 +3167,7 @@ lo_import 152801 Certain variables are special, in that they control psql's behavior or are automatically set to reflect connection state. These variables are - documented in , below. + documented in , below. @@ -3318,8 +3311,7 @@ testdb=> \setenv LESS -imx4F Most variables that control psql's behavior cannot be unset; instead, an \unset command is interpreted as setting them to their default values. - See , below. + See below. @@ -3489,8 +3481,8 @@ select 1\; select 2\; select 3; - - Patterns + + Patterns patterns @@ -3582,8 +3574,8 @@ select 1\; select 2\; select 3; Advanced Features - - Variables + + Variables psql provides variable substitution @@ -3607,8 +3599,7 @@ testdb=> \echo :foo bar This works in both regular SQL commands and meta-commands; there is - more detail in , below. + more detail in , below. @@ -4016,8 +4007,7 @@ bar These specify what the prompts psql issues should look like. See below. + linkend="app-psql-prompting"/> below. @@ -4151,8 +4141,8 @@ bar - - <acronym>SQL</acronym> Interpolation + + <acronym>SQL</acronym> Interpolation A key feature of psql @@ -4236,8 +4226,8 @@ testdb=> INSERT INTO my_table VALUES (:'content'); - - Prompting + + Prompting The prompts psql issues can be customized @@ -4393,9 +4383,8 @@ testdb=> INSERT INTO my_table VALUES (:'content'); The value of the psql variable - name. See the - section for details. + name. See + , above, for details. @@ -4492,8 +4481,8 @@ $endif - - Environment + + Environment @@ -4798,8 +4787,8 @@ PSQL_EDITOR_LINENUMBER_ARG='--line ' - - Examples + + Examples The first example shows how to spread a command over several lines of diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml index c54a7c420d..aac5d5be23 100644 --- a/doc/src/sgml/ref/reindex.sgml +++ b/doc/src/sgml/ref/reindex.sgml @@ -163,8 +163,7 @@ REINDEX [ ( option [, ...] ) ] { IN updates, or deletes on the table; whereas a standard index rebuild locks out writes (but not reads) on the table until it's done. There are several caveats to be aware of when using this option - — see . + — see below. For temporary tables, REINDEX is always @@ -264,8 +263,8 @@ REINDEX [ ( option [, ...] ) ] { IN Each individual partition can be reindexed separately instead. - - Rebuilding Indexes Concurrently + + Rebuilding Indexes Concurrently index diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 91388151ad..475281dd7b 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -95,7 +95,7 @@ TABLE [ ONLY ] table_name [ * ] that is referenced more than once in FROM is computed only once, unless specified otherwise with NOT MATERIALIZED. - (See below.) + (See below.) @@ -105,7 +105,7 @@ TABLE [ ONLY ] table_name [ * ] (Each element in the FROM list is a real or virtual table.) If more than one element is specified in the FROM list, they are cross-joined together. - (See below.) + (See below.) @@ -113,8 +113,7 @@ TABLE [ ONLY ] table_name [ * ] If the WHERE clause is specified, all rows that do not satisfy the condition are eliminated from the - output. (See below.) + output. (See below.) @@ -126,8 +125,8 @@ TABLE [ ONLY ] table_name [ * ] values, and the results of aggregate functions are computed. If the HAVING clause is present, it eliminates groups that do not satisfy the given condition. (See - and - below.) + and + below.) @@ -135,9 +134,7 @@ TABLE [ ONLY ] table_name [ * ] The actual output rows are computed using the SELECT output expressions for each selected - row or row group. (See - - below.) + row or row group. (See below.) @@ -146,8 +143,7 @@ TABLE [ ONLY ] table_name [ * ] result. SELECT DISTINCT ON eliminates rows that match on all the specified expressions. SELECT ALL (the default) will return all candidate rows, including - duplicates. (See below.) + duplicates. (See below.) @@ -168,9 +164,8 @@ TABLE [ ONLY ] table_name [ * ] eliminating duplicate rows. Notice that DISTINCT is the default behavior here, even though ALL is the default for SELECT itself. (See - , , and - below.) + , , and + below.) @@ -180,7 +175,7 @@ TABLE [ ONLY ] table_name [ * ] returned rows are sorted in the specified order. If ORDER BY is not given, the rows are returned in whatever order the system finds fastest to produce. (See - below.) + below.) @@ -189,7 +184,7 @@ TABLE [ ONLY ] table_name [ * ] If the LIMIT (or FETCH FIRST) or OFFSET clause is specified, the SELECT statement only returns a subset of the result rows. (See below.) + linkend="sql-limit"/> below.) @@ -199,8 +194,8 @@ TABLE [ ONLY ] table_name [ * ] or FOR KEY SHARE is specified, the SELECT statement locks the selected rows - against concurrent updates. (See below.) + against concurrent updates. (See + below.) @@ -219,8 +214,8 @@ TABLE [ ONLY ] table_name [ * ] Parameters - - <literal>WITH</literal> Clause + + <literal>WITH</literal> Clause The WITH clause allows you to specify one or more @@ -336,8 +331,8 @@ TABLE [ ONLY ] table_name [ * ] - - <literal>FROM</literal> Clause + + <literal>FROM</literal> Clause The FROM clause specifies one or more source @@ -707,8 +702,8 @@ TABLE [ ONLY ] table_name [ * ] - - <literal>WHERE</literal> Clause + + <literal>WHERE</literal> Clause The optional WHERE clause has the general form @@ -724,8 +719,8 @@ WHERE condition - - <literal>GROUP BY</literal> Clause + + <literal>GROUP BY</literal> Clause The optional GROUP BY clause has the general form @@ -798,8 +793,8 @@ GROUP BY grouping_element [, ...] - - <literal>HAVING</literal> Clause + + <literal>HAVING</literal> Clause The optional HAVING clause has the general form @@ -841,8 +836,8 @@ HAVING condition - - <literal>WINDOW</literal> Clause + + <literal>WINDOW</literal> Clause The optional WINDOW clause has the general form @@ -874,8 +869,8 @@ WINDOW window_name AS ( The elements of the PARTITION BY list are interpreted in - much the same fashion as elements of a - , except that + much the same fashion as elements of a GROUP BY clause, except that they are always simple expressions and never the name or number of an output column. Another difference is that these expressions can contain aggregate @@ -886,8 +881,8 @@ WINDOW window_name AS ( Similarly, the elements of the ORDER BY list are interpreted - in much the same fashion as elements of an - , except that + in much the same fashion as elements of a statement-level ORDER BY clause, except that the expressions are always taken as simple expressions and never the name or number of an output column. @@ -1011,8 +1006,9 @@ EXCLUDE NO OTHERS The purpose of a WINDOW clause is to specify the behavior of window functions appearing in the query's - or - . These functions + SELECT list or + ORDER BY clause. + These functions can reference the WINDOW clause entries by name in their OVER clauses. A WINDOW clause entry does not have to be referenced anywhere, however; if it is not @@ -1038,8 +1034,8 @@ EXCLUDE NO OTHERS - - <command>SELECT</command> List + + <command>SELECT</command> List The SELECT list (between the key words @@ -1119,8 +1115,8 @@ EXCLUDE NO OTHERS - - <literal>DISTINCT</literal> Clause + + <literal>DISTINCT</literal> Clause If SELECT DISTINCT is specified, all duplicate rows are @@ -1164,8 +1160,8 @@ SELECT DISTINCT ON (location) location, time, report - - <literal>UNION</literal> Clause + + <literal>UNION</literal> Clause The UNION clause has this general form: @@ -1217,8 +1213,8 @@ SELECT DISTINCT ON (location) location, time, report - - <literal>INTERSECT</literal> Clause + + <literal>INTERSECT</literal> Clause The INTERSECT clause has this general form: @@ -1265,8 +1261,8 @@ SELECT DISTINCT ON (location) location, time, report - - <literal>EXCEPT</literal> Clause + + <literal>EXCEPT</literal> Clause The EXCEPT clause has this general form: @@ -1309,8 +1305,8 @@ SELECT DISTINCT ON (location) location, time, report - - <literal>ORDER BY</literal> Clause + + <literal>ORDER BY</literal> Clause The optional ORDER BY clause has this general form: @@ -1407,8 +1403,8 @@ SELECT name FROM distributors ORDER BY code; - - <literal>LIMIT</literal> Clause + + <literal>LIMIT</literal> Clause The LIMIT clause consists of two independent @@ -1492,8 +1488,8 @@ FETCH { FIRST | NEXT } [ count ] { - - The Locking Clause + + The Locking Clause FOR UPDATE, FOR NO KEY UPDATE, FOR SHARE @@ -2086,7 +2082,7 @@ SELECT distributors.* WHERE distributors.name = 'Westward'; used by MySQL. The SQL:2008 standard has introduced the clauses OFFSET ... FETCH {FIRST|NEXT} ... for the same functionality, as shown above - in . This + in . This syntax is also used by IBM DB2. (Applications written for Oracle frequently use a workaround involving the automatically diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml index f2891a3b0a..3fa54e5f70 100644 --- a/doc/src/sgml/ref/update.sgml +++ b/doc/src/sgml/ref/update.sgml @@ -172,8 +172,9 @@ UPDATE [ ONLY ] table_name [ * ] [ A table expression allowing columns from other tables to appear in the WHERE condition and update expressions. This - uses the same syntax as the of a SELECT statement; + uses the same syntax as the FROM clause of + a SELECT statement; for example, an alias for the table name can be specified. Do not repeat the target table as a from_item unless you intend a self-join (in which case it must appear with diff --git a/doc/src/sgml/ref/values.sgml b/doc/src/sgml/ref/values.sgml index 849220b120..d3a3aaff14 100644 --- a/doc/src/sgml/ref/values.sgml +++ b/doc/src/sgml/ref/values.sgml @@ -85,7 +85,8 @@ VALUES ( expression [, ...] ) [, .. rows. This expression can refer to the columns of the VALUES result as column1, column2, etc. For more details see - . + + in the documentation. @@ -95,7 +96,8 @@ VALUES ( expression [, ...] ) [, .. A sorting operator. For details see - . + + in the documentation. @@ -105,7 +107,8 @@ VALUES ( expression [, ...] ) [, .. The maximum number of rows to return. For details see - . + + in the documentation. @@ -115,8 +118,8 @@ VALUES ( expression [, ...] ) [, .. The number of rows to skip before starting to return rows. - For details see - . + For details see + in the documentation.