Skip to content

Commit 463bef2

Browse files
committed
Misc documentation fixes.
- Misc grammar and punctuation fixes. - Stylistic cleanup: use spaces between function arguments and JSON fields in examples. For example "foo(a,b)" -> "foo(a, b)". Add semicolon after last END in a few PL/pgSQL examples that were missing them. - Make sentence that talked about "..." and ".." operators more clear, by avoiding to end the sentence with "..". That makes it look the same as "..." - Fix syntax description for HAVING: HAVING conditions cannot be repeated Patch by Justin Pryzby, per Yaroslav Schekin's report. Backpatch to all supported versions, to the extent that the patch applies easily. Discussion: https://www.postgresql.org/message-id/20201005191922.GE17626%40telsasoft.com
1 parent d348473 commit 463bef2

16 files changed

+41
-41
lines changed

doc/src/sgml/catalogs.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@
13181318
<entry><type>bool</type></entry>
13191319
<entry>
13201320
Role can log in. That is, this role can be given as the initial
1321-
session authorization identifier
1321+
session authorization identifier.
13221322
</entry>
13231323
</row>
13241324

doc/src/sgml/config.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8436,8 +8436,8 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
84368436
</term>
84378437
<listitem>
84388438
<para>
8439-
If set, do not trace locks for tables below this OID. (use to avoid
8440-
output on system tables)
8439+
If set, do not trace locks for tables below this OID (used to avoid
8440+
output on system tables).
84418441
</para>
84428442
<para>
84438443
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>

doc/src/sgml/dblink.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ SELECT dblink_connect('myconn', 'fdtest');
167167
OK
168168
(1 row)
169169

170-
SELECT * FROM dblink('myconn','SELECT * FROM foo') AS t(a int, b text, c text[]);
170+
SELECT * FROM dblink('myconn', 'SELECT * FROM foo') AS t(a int, b text, c text[]);
171171
a | b | c
172172
----+---+---------------
173173
0 | a | {a0,b0,c0}
@@ -616,7 +616,7 @@ dblink_exec(text sql [, bool fail_on_error]) returns text
616616
<para>
617617
The SQL command that you wish to execute in the remote database,
618618
for example
619-
<literal>insert into foo values(0,'a','{"a0","b0","c0"}')</>.
619+
<literal>insert into foo values(0, 'a', '{"a0","b0","c0"}')</literal>.
620620
</para>
621621
</listitem>
622622
</varlistentry>
@@ -653,7 +653,7 @@ SELECT dblink_connect('dbname=dblink_test_standby');
653653
OK
654654
(1 row)
655655

656-
SELECT dblink_exec('insert into foo values(21,''z'',''{"a0","b0","c0"}'');');
656+
SELECT dblink_exec('insert into foo values(21, ''z'', ''{"a0","b0","c0"}'');');
657657
dblink_exec
658658
-----------------
659659
INSERT 943366 1
@@ -665,7 +665,7 @@ SELECT dblink_connect('myconn', 'dbname=regression');
665665
OK
666666
(1 row)
667667

668-
SELECT dblink_exec('myconn', 'insert into foo values(21,''z'',''{"a0","b0","c0"}'');');
668+
SELECT dblink_exec('myconn', 'insert into foo values(21, ''z'', ''{"a0","b0","c0"}'');');
669669
dblink_exec
670670
------------------
671671
INSERT 6432584 1

doc/src/sgml/func.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20798,7 +20798,7 @@ BEGIN
2079820798
obj.object_name,
2079920799
obj.object_identity;
2080020800
END LOOP;
20801-
END
20801+
END;
2080220802
$$;
2080320803
CREATE EVENT TRIGGER test_event_trigger_for_drops
2080420804
ON sql_drop

doc/src/sgml/gin.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,8 @@
564564
if a foreground cleanup does occur, it will take even longer.
565565
</para>
566566
<para>
567-
<varname>gin_pending_list_limit</> can be overridden for individual
568-
GIN indexes by changing storage parameters, and which allows each
567+
<varname>gin_pending_list_limit</varname> can be overridden for individual
568+
GIN indexes by changing storage parameters, which allows each
569569
GIN index to have its own cleanup threshold.
570570
For example, it's possible to increase the threshold only for the GIN
571571
index which can be updated heavily, and decrease it otherwise.

doc/src/sgml/high-availability.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
14931493
Note that in this mode, the server will apply WAL one file at a
14941494
time, so if you use the standby server for queries (see Hot Standby),
14951495
there is a delay between an action in the master and when the
1496-
action becomes visible in the standby, corresponding the time it takes
1496+
action becomes visible in the standby, corresponding to the time it takes
14971497
to fill up the WAL file. <varname>archive_timeout</> can be used to make that delay
14981498
shorter. Also note that you can't combine streaming replication with
14991499
this method.

doc/src/sgml/isn.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
hard-coded list of prefixes; this list of prefixes is also used to hyphenate
1515
numbers on output. Since new prefixes are assigned from time to time, the
1616
list of prefixes may be out of date. It is hoped that a future version of
17-
this module will obtained the prefix list from one or more tables that
17+
this module will obtain the prefix list from one or more tables that
1818
can be easily updated by users as needed; however, at present, the
1919
list can only be updated by modifying the source code and recompiling.
2020
Alternatively, prefix validation and hyphenation support may be

doc/src/sgml/mvcc.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ ERROR: could not serialize access due to read/write dependencies among transact
12391239
<para>
12401240
The <literal>FOR UPDATE</> lock mode
12411241
is also acquired by any <command>DELETE</> on a row, and also by an
1242-
<command>UPDATE</> that modifies the values on certain columns. Currently,
1242+
<command>UPDATE</> that modifies the values of certain columns. Currently,
12431243
the set of columns considered for the <command>UPDATE</> case are those that
12441244
have a unique index on them that can be used in a foreign key (so partial
12451245
indexes and expressional indexes are not considered), but this may change

doc/src/sgml/parallel.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
439439
</para>
440440

441441
<para>
442-
The following operations are always parallel restricted.
442+
The following operations are always parallel restricted:
443443
</para>
444444

445445
<itemizedlist>

doc/src/sgml/plpgsql.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ BEGIN
11271127
SELECT users.userid INTO STRICT userid
11281128
FROM users WHERE users.username = get_userid.username;
11291129
RETURN userid;
1130-
END
1130+
END;
11311131
$$ LANGUAGE plpgsql;
11321132
</programlisting>
11331133
On failure, this function might produce an error message such as
@@ -1805,7 +1805,7 @@ BEGIN
18051805
RETURN NEXT r; -- return current row of SELECT
18061806
END LOOP;
18071807
RETURN;
1808-
END
1808+
END;
18091809
$BODY$
18101810
LANGUAGE plpgsql;
18111811

@@ -1833,7 +1833,7 @@ BEGIN
18331833
END IF;
18341834

18351835
RETURN;
1836-
END
1836+
END;
18371837
$BODY$
18381838
LANGUAGE plpgsql;
18391839

@@ -4972,7 +4972,7 @@ DECLARE
49724972
f1 int;
49734973
BEGIN
49744974
RETURN f1;
4975-
END
4975+
END;
49764976
$$ LANGUAGE plpgsql;
49774977
WARNING: variable "f1" shadows a previously defined variable
49784978
LINE 3: f1 int;

doc/src/sgml/protocol.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2542,7 +2542,7 @@ The commands accepted in walsender mode are:
25422542
<para>
25432543
Every sent transaction contains zero or more DML messages (Insert,
25442544
Update, Delete). In case of a cascaded setup it can also contain Origin
2545-
messages. The origin message indicated that the transaction originated on
2545+
messages. The origin message indicates that the transaction originated on
25462546
different replication node. Since a replication node in the scope of logical
25472547
replication protocol can be pretty much anything, the only identifier
25482548
is the origin name. It's downstream's responsibility to handle this as

doc/src/sgml/ref/select.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
3838
[ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
3939
[ WHERE <replaceable class="parameter">condition</replaceable> ]
4040
[ GROUP BY <replaceable class="parameter">grouping_element</replaceable> [, ...] ]
41-
[ HAVING <replaceable class="parameter">condition</replaceable> [, ...] ]
41+
[ HAVING <replaceable class="parameter">condition</replaceable> ]
4242
[ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceable class="parameter">window_definition</replaceable> ) [, ...] ]
4343
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <replaceable class="parameter">select</replaceable> ]
4444
[ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | USING <replaceable class="parameter">operator</replaceable> ] [ NULLS { FIRST | LAST } ] [, ...] ]

doc/src/sgml/ref/select_into.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
2828
[ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
2929
[ WHERE <replaceable class="parameter">condition</replaceable> ]
3030
[ GROUP BY <replaceable class="parameter">expression</replaceable> [, ...] ]
31-
[ HAVING <replaceable class="parameter">condition</replaceable> [, ...] ]
31+
[ HAVING <replaceable class="parameter">condition</replaceable> ]
3232
[ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceable class="parameter">window_definition</replaceable> ) [, ...] ]
3333
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <replaceable class="parameter">select</replaceable> ]
3434
[ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | USING <replaceable class="parameter">operator</replaceable> ] [ NULLS { FIRST | LAST } ] [, ...] ]

doc/src/sgml/rules.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
769769
</para>
770770

771771
<para>
772-
The benefit of implementing views with the rule system is,
772+
The benefit of implementing views with the rule system is
773773
that the planner has all
774774
the information about which tables have to be scanned plus the
775775
relationships between these tables plus the restrictive
@@ -781,7 +781,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
781781
the best path to execute the query, and the more information
782782
the planner has, the better this decision can be. And
783783
the rule system as implemented in <productname>PostgreSQL</productname>
784-
ensures, that this is all information available about the query
784+
ensures that this is all information available about the query
785785
up to that point.
786786
</para>
787787
</sect2>
@@ -2086,7 +2086,7 @@ CREATE FUNCTION tricky(text, text) RETURNS bool AS $$
20862086
BEGIN
20872087
RAISE NOTICE '% =&gt; %', $1, $2;
20882088
RETURN true;
2089-
END
2089+
END;
20902090
$$ LANGUAGE plpgsql COST 0.0000000000000000000001;
20912091

20922092
SELECT * FROM phone_number WHERE tricky(person, phone);

doc/src/sgml/seg.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ test=&gt; select '6.25 .. 6.50'::seg as "pH";
197197
</table>
198198

199199
<para>
200-
Because <literal>...</> is widely used in data sources, it is allowed
201-
as an alternative spelling of <literal>..</>. Unfortunately, this
200+
Because the <literal>...</literal> operator is widely used in data sources, it is allowed
201+
as an alternative spelling of the <literal>..</literal> operator. Unfortunately, this
202202
creates a parsing ambiguity: it is not clear whether the upper bound
203203
in <literal>0...23</> is meant to be <literal>23</> or <literal>0.23</>.
204204
This is resolved by requiring at least one digit before the decimal

doc/src/sgml/textsearch.sgml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,7 @@ ALTER TEXT SEARCH CONFIGURATION astro_en
23212321
positions in <type>tsvector</type>, which in turn affect ranking:
23222322

23232323
<screen>
2324-
SELECT to_tsvector('english','in the list of stop words');
2324+
SELECT to_tsvector('english', 'in the list of stop words');
23252325
to_tsvector
23262326
----------------------------
23272327
'list':3 'stop':5 'word':6
@@ -2331,12 +2331,12 @@ SELECT to_tsvector('english','in the list of stop words');
23312331
calculated for documents with and without stop words are quite different:
23322332

23332333
<screen>
2334-
SELECT ts_rank_cd (to_tsvector('english','in the list of stop words'), to_tsquery('list &amp; stop'));
2334+
SELECT ts_rank_cd (to_tsvector('english', 'in the list of stop words'), to_tsquery('list &amp; stop'));
23352335
ts_rank_cd
23362336
------------
23372337
0.05
23382338

2339-
SELECT ts_rank_cd (to_tsvector('english','list stop words'), to_tsquery('list &amp; stop'));
2339+
SELECT ts_rank_cd (to_tsvector('english', 'list stop words'), to_tsquery('list &amp; stop'));
23402340
ts_rank_cd
23412341
------------
23422342
0.1
@@ -2395,12 +2395,12 @@ CREATE TEXT SEARCH DICTIONARY public.simple_dict (
23952395
Now we can test our dictionary:
23962396

23972397
<screen>
2398-
SELECT ts_lexize('public.simple_dict','YeS');
2398+
SELECT ts_lexize('public.simple_dict', 'YeS');
23992399
ts_lexize
24002400
-----------
24012401
{yes}
24022402

2403-
SELECT ts_lexize('public.simple_dict','The');
2403+
SELECT ts_lexize('public.simple_dict', 'The');
24042404
ts_lexize
24052405
-----------
24062406
{}
@@ -2416,12 +2416,12 @@ SELECT ts_lexize('public.simple_dict','The');
24162416
<screen>
24172417
ALTER TEXT SEARCH DICTIONARY public.simple_dict ( Accept = false );
24182418

2419-
SELECT ts_lexize('public.simple_dict','YeS');
2419+
SELECT ts_lexize('public.simple_dict', 'YeS');
24202420
ts_lexize
24212421
-----------
24222422

24232423

2424-
SELECT ts_lexize('public.simple_dict','The');
2424+
SELECT ts_lexize('public.simple_dict', 'The');
24252425
ts_lexize
24262426
-----------
24272427
{}
@@ -2535,21 +2535,21 @@ indices index*
25352535
Then we will get these results:
25362536
<screen>
25372537
mydb=# CREATE TEXT SEARCH DICTIONARY syn (template=synonym, synonyms='synonym_sample');
2538-
mydb=# SELECT ts_lexize('syn','indices');
2538+
mydb=# SELECT ts_lexize('syn', 'indices');
25392539
ts_lexize
25402540
-----------
25412541
{index}
25422542
(1 row)
25432543

25442544
mydb=# CREATE TEXT SEARCH CONFIGURATION tst (copy=simple);
25452545
mydb=# ALTER TEXT SEARCH CONFIGURATION tst ALTER MAPPING FOR asciiword WITH syn;
2546-
mydb=# SELECT to_tsvector('tst','indices');
2546+
mydb=# SELECT to_tsvector('tst', 'indices');
25472547
to_tsvector
25482548
-------------
25492549
'index':1
25502550
(1 row)
25512551

2552-
mydb=# SELECT to_tsquery('tst','indices');
2552+
mydb=# SELECT to_tsquery('tst', 'indices');
25532553
to_tsquery
25542554
------------
25552555
'index':*
@@ -2561,7 +2561,7 @@ mydb=# SELECT 'indexes are very useful'::tsvector;
25612561
'are' 'indexes' 'useful' 'very'
25622562
(1 row)
25632563

2564-
mydb=# SELECT 'indexes are very useful'::tsvector @@ to_tsquery('tst','indices');
2564+
mydb=# SELECT 'indexes are very useful'::tsvector @@ to_tsquery('tst', 'indices');
25652565
?column?
25662566
----------
25672567
t
@@ -3256,7 +3256,7 @@ ts_debug(<optional> <replaceable class="PARAMETER">config</replaceable> <type>re
32563256
Here is a simple example:
32573257

32583258
<screen>
3259-
SELECT * FROM ts_debug('english','a fat cat sat on a mat - it ate a fat rats');
3259+
SELECT * FROM ts_debug('english', 'a fat cat sat on a mat - it ate a fat rats');
32603260
alias | description | token | dictionaries | dictionary | lexemes
32613261
-----------+-----------------+-------+----------------+--------------+---------
32623262
asciiword | Word, all ASCII | a | {english_stem} | english_stem | {}
@@ -3307,7 +3307,7 @@ ALTER TEXT SEARCH CONFIGURATION public.english
33073307
</programlisting>
33083308

33093309
<screen>
3310-
SELECT * FROM ts_debug('public.english','The Brightest supernovaes');
3310+
SELECT * FROM ts_debug('public.english', 'The Brightest supernovaes');
33113311
alias | description | token | dictionaries | dictionary | lexemes
33123312
-----------+-----------------+-------------+-------------------------------+----------------+-------------
33133313
asciiword | Word, all ASCII | The | {english_ispell,english_stem} | english_ispell | {}
@@ -3346,7 +3346,7 @@ SELECT * FROM ts_debug('public.english','The Brightest supernovaes');
33463346

33473347
<screen>
33483348
SELECT alias, token, dictionary, lexemes
3349-
FROM ts_debug('public.english','The Brightest supernovaes');
3349+
FROM ts_debug('public.english', 'The Brightest supernovaes');
33503350
alias | token | dictionary | lexemes
33513351
-----------+-------------+----------------+-------------
33523352
asciiword | The | english_ispell | {}
@@ -3494,7 +3494,7 @@ SELECT ts_lexize('english_stem', 'a');
34943494
where this can be confusing:
34953495

34963496
<screen>
3497-
SELECT ts_lexize('thesaurus_astro','supernovae stars') is null;
3497+
SELECT ts_lexize('thesaurus_astro', 'supernovae stars') is null;
34983498
?column?
34993499
----------
35003500
t

0 commit comments

Comments
 (0)