Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 33acc6b

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 3b5bf7b commit 33acc6b

19 files changed

+69
-69
lines changed

doc/src/sgml/catalogs.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,7 @@
15231523
</para>
15241524
<para>
15251525
Role can log in. That is, this role can be given as the initial
1526-
session authorization identifier
1526+
session authorization identifier.
15271527
</para></entry>
15281528
</row>
15291529

doc/src/sgml/config.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10108,8 +10108,8 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
1010810108
</term>
1010910109
<listitem>
1011010110
<para>
10111-
If set, do not trace locks for tables below this OID. (use to avoid
10112-
output on system tables)
10111+
If set, do not trace locks for tables below this OID (used to avoid
10112+
output on system tables).
1011310113
</para>
1011410114
<para>
1011510115
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
@@ -166,7 +166,7 @@ SELECT dblink_connect('myconn', 'fdtest');
166166
OK
167167
(1 row)
168168

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

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

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

doc/src/sgml/func.sgml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14987,7 +14987,7 @@ table2-mapping
1498714987
per <function>to_json</function> or <function>to_jsonb</function>.
1498814988
</para>
1498914989
<para>
14990-
<literal>json_build_array(1,2,'foo',4,5)</literal>
14990+
<literal>json_build_array(1, 2, 'foo', 4, 5)</literal>
1499114991
<returnvalue>[1, 2, "foo", 4, 5]</returnvalue>
1499214992
</para></entry>
1499314993
</row>
@@ -15014,7 +15014,7 @@ table2-mapping
1501415014
per <function>to_json</function> or <function>to_jsonb</function>.
1501515015
</para>
1501615016
<para>
15017-
<literal>json_build_object('foo',1,2,row(3,'bar'))</literal>
15017+
<literal>json_build_object('foo', 1, 2, row(3,'bar'))</literal>
1501815018
<returnvalue>{"foo" : 1, "2" : {"f1":3,"f2":"bar"}}</returnvalue>
1501915019
</para></entry>
1502015020
</row>
@@ -15046,7 +15046,7 @@ table2-mapping
1504615046
<literal>json_object('{a, 1, b, "def", c, 3.5}')</literal>
1504715047
<returnvalue>{"a" : "1", "b" : "def", "c" : "3.5"}</returnvalue>
1504815048
</para>
15049-
<para><literal>json_object('{{a, 1},{b, "def"},{c, 3.5}}')</literal>
15049+
<para><literal>json_object('{{a, 1}, {b, "def"}, {c, 3.5}}')</literal>
1505015050
<returnvalue>{"a" : "1", "b" : "def", "c" : "3.5"}</returnvalue>
1505115051
</para></entry>
1505215052
</row>
@@ -15066,7 +15066,7 @@ table2-mapping
1506615066
the one-argument form.
1506715067
</para>
1506815068
<para>
15069-
<literal>json_object('{a, b}', '{1,2}')</literal>
15069+
<literal>json_object('{a,b}', '{1,2}')</literal>
1507015070
<returnvalue>{"a": "1", "b": "2"}</returnvalue>
1507115071
</para></entry>
1507215072
</row>
@@ -15457,7 +15457,7 @@ table2-mapping
1545715457
<literal>create type twoints as (a int, b int);</literal>
1545815458
</para>
1545915459
<para>
15460-
<literal>select * from json_populate_recordset(null::twoints, '[{"a":1,"b":2},{"a":3,"b":4}]')</literal>
15460+
<literal>select * from json_populate_recordset(null::twoints, '[{"a":1,"b":2}, {"a":3,"b":4}]')</literal>
1546115461
<returnvalue></returnvalue>
1546215462
<programlisting>
1546315463
a | b
@@ -15532,7 +15532,7 @@ table2-mapping
1553215532
for <function>json[b]_populate_record</function>.
1553315533
</para>
1553415534
<para>
15535-
<literal>select * from json_to_recordset('[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]') as x(a int, b text)</literal>
15535+
<literal>select * from json_to_recordset('[{"a":1,"b":"foo"}, {"a":"2","c":"bar"}]') as x(a int, b text)</literal>
1553615536
<returnvalue></returnvalue>
1553715537
<programlisting>
1553815538
a | b
@@ -15570,11 +15570,11 @@ table2-mapping
1557015570
or at the end of the array if it is positive.
1557115571
</para>
1557215572
<para>
15573-
<literal>jsonb_set('[{"f1":1,"f2":null},2,null,3]', '{0,f1}','[2,3,4]', false)</literal>
15573+
<literal>jsonb_set('[{"f1":1,"f2":null},2,null,3]', '{0,f1}', '[2,3,4]', false)</literal>
1557415574
<returnvalue>[{"f1": [2, 3, 4], "f2": null}, 2, null, 3]</returnvalue>
1557515575
</para>
1557615576
<para>
15577-
<literal>jsonb_set('[{"f1":1,"f2":null},2]', '{0,f3}','[2,3,4]')</literal>
15577+
<literal>jsonb_set('[{"f1":1,"f2":null},2]', '{0,f3}', '[2,3,4]')</literal>
1557815578
<returnvalue>[{"f1": 1, "f2": null, "f3": [2, 3, 4]}, 2]</returnvalue>
1557915579
</para></entry>
1558015580
</row>
@@ -15666,7 +15666,7 @@ table2-mapping
1566615666
untouched.
1566715667
</para>
1566815668
<para>
15669-
<literal>json_strip_nulls('[{"f1":1,"f2":null},2,null,3]')</literal>
15669+
<literal>json_strip_nulls('[{"f1":1, "f2":null}, 2, null, 3]')</literal>
1567015670
<returnvalue>[{"f1":1},2,null,3]</returnvalue>
1567115671
</para></entry>
1567215672
</row>
@@ -15690,7 +15690,7 @@ table2-mapping
1569015690
as the <literal>@?</literal> and <literal>@@</literal> operators do.
1569115691
</para>
1569215692
<para>
15693-
<literal>jsonb_path_exists('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
15693+
<literal>jsonb_path_exists('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
1569415694
<returnvalue>t</returnvalue>
1569515695
</para></entry>
1569615696
</row>
@@ -15712,7 +15712,7 @@ table2-mapping
1571215712
for <function>jsonb_path_exists</function>.
1571315713
</para>
1571415714
<para>
15715-
<literal>jsonb_path_match('{"a":[1,2,3,4,5]}', 'exists($.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max))', '{"min":2,"max":4}')</literal>
15715+
<literal>jsonb_path_match('{"a":[1,2,3,4,5]}', 'exists($.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max))', '{"min":2, "max":4}')</literal>
1571615716
<returnvalue>t</returnvalue>
1571715717
</para></entry>
1571815718
</row>
@@ -15733,7 +15733,7 @@ table2-mapping
1573315733
for <function>jsonb_path_exists</function>.
1573415734
</para>
1573515735
<para>
15736-
<literal>select * from jsonb_path_query('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
15736+
<literal>select * from jsonb_path_query('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
1573715737
<returnvalue></returnvalue>
1573815738
<programlisting>
1573915739
jsonb_path_query
@@ -15761,7 +15761,7 @@ table2-mapping
1576115761
for <function>jsonb_path_exists</function>.
1576215762
</para>
1576315763
<para>
15764-
<literal>jsonb_path_query_array('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
15764+
<literal>jsonb_path_query_array('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
1576515765
<returnvalue>[2, 3, 4]</returnvalue>
1576615766
</para></entry>
1576715767
</row>
@@ -15783,7 +15783,7 @@ table2-mapping
1578315783
for <function>jsonb_path_exists</function>.
1578415784
</para>
1578515785
<para>
15786-
<literal>jsonb_path_query_first('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
15786+
<literal>jsonb_path_query_first('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
1578715787
<returnvalue>2</returnvalue>
1578815788
</para></entry>
1578915789
</row>
@@ -15855,7 +15855,7 @@ table2-mapping
1585515855
Converts the given JSON value to pretty-printed, indented text.
1585615856
</para>
1585715857
<para>
15858-
<literal>jsonb_pretty('[{"f1":1,"f2":null},2]')</literal>
15858+
<literal>jsonb_pretty('[{"f1":1,"f2":null}, 2]')</literal>
1585915859
<returnvalue></returnvalue>
1586015860
<programlisting>
1586115861
[
@@ -26549,7 +26549,7 @@ BEGIN
2654926549
obj.object_name,
2655026550
obj.object_identity;
2655126551
END LOOP;
26552-
END
26552+
END;
2655326553
$$;
2655426554
CREATE EVENT TRIGGER test_event_trigger_for_drops
2655526555
ON sql_drop

doc/src/sgml/gin.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@
603603
</para>
604604
<para>
605605
<varname>gin_pending_list_limit</varname> can be overridden for individual
606-
GIN indexes by changing storage parameters, and which allows each
606+
GIN indexes by changing storage parameters, which allows each
607607
GIN index to have its own cleanup threshold.
608608
For example, it's possible to increase the threshold only for the GIN
609609
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
@@ -1505,7 +1505,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
15051505
Note that in this mode, the server will apply WAL one file at a
15061506
time, so if you use the standby server for queries (see Hot Standby),
15071507
there is a delay between an action in the master and when the
1508-
action becomes visible in the standby, corresponding the time it takes
1508+
action becomes visible in the standby, corresponding to the time it takes
15091509
to fill up the WAL file. <varname>archive_timeout</varname> can be used to make that delay
15101510
shorter. Also note that you can't combine streaming replication with
15111511
this method.

doc/src/sgml/hstore.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ b
631631
Does <type>hstore</type> contain key?
632632
</para>
633633
<para>
634-
<literal>exist('a=&gt;1','a')</literal>
634+
<literal>exist('a=&gt;1', 'a')</literal>
635635
<returnvalue>t</returnvalue>
636636
</para></entry>
637637
</row>
@@ -647,7 +647,7 @@ b
647647
for key?
648648
</para>
649649
<para>
650-
<literal>defined('a=&gt;NULL','a')</literal>
650+
<literal>defined('a=&gt;NULL', 'a')</literal>
651651
<returnvalue>f</returnvalue>
652652
</para></entry>
653653
</row>
@@ -662,7 +662,7 @@ b
662662
Deletes pair with matching key.
663663
</para>
664664
<para>
665-
<literal>delete('a=&gt;1,b=&gt;2','b')</literal>
665+
<literal>delete('a=&gt;1,b=&gt;2', 'b')</literal>
666666
<returnvalue>"a"=&gt;"1"</returnvalue>
667667
</para></entry>
668668
</row>
@@ -676,7 +676,7 @@ b
676676
Deletes pairs with matching keys.
677677
</para>
678678
<para>
679-
<literal>delete('a=&gt;1,b=&gt;2,c=&gt;3',ARRAY['a','b'])</literal>
679+
<literal>delete('a=&gt;1,b=&gt;2,c=&gt;3', ARRAY['a','b'])</literal>
680680
<returnvalue>"c"=&gt;"3"</returnvalue>
681681
</para></entry>
682682
</row>
@@ -690,7 +690,7 @@ b
690690
Deletes pairs matching those in the second argument.
691691
</para>
692692
<para>
693-
<literal>delete('a=&gt;1,b=&gt;2','a=&gt;4,b=&gt;2'::hstore)</literal>
693+
<literal>delete('a=&gt;1,b=&gt;2', 'a=&gt;4,b=&gt;2'::hstore)</literal>
694694
<returnvalue>"a"=&gt;"1"</returnvalue>
695695
</para></entry>
696696
</row>

doc/src/sgml/indexam.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ amgettuple (IndexScanDesc scan,
570570
will pass the caller's snapshot test. On success, <function>amgettuple</function>
571571
must also set <literal>scan-&gt;xs_recheck</literal> to true or false.
572572
False means it is certain that the index entry matches the scan keys.
573-
true means this is not certain, and the conditions represented by the
573+
True means this is not certain, and the conditions represented by the
574574
scan keys must be rechecked against the heap tuple after fetching it.
575575
This provision supports <quote>lossy</quote> index operators.
576576
Note that rechecking will extend only to the scan conditions; a partial

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/ltree.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ Europe &amp; Russia*@ &amp; !Transportation
460460
position <parameter>end</parameter>-1 (counting from 0).
461461
</para>
462462
<para>
463-
<literal>subltree('Top.Child1.Child2',1,2)</literal>
463+
<literal>subltree('Top.Child1.Child2', 1, 2)</literal>
464464
<returnvalue>Child1</returnvalue>
465465
</para></entry>
466466
</row>
@@ -480,7 +480,7 @@ Europe &amp; Russia*@ &amp; !Transportation
480480
the end of the path.
481481
</para>
482482
<para>
483-
<literal>subpath('Top.Child1.Child2',0,2)</literal>
483+
<literal>subpath('Top.Child1.Child2', 0, 2)</literal>
484484
<returnvalue>Top.Child1</returnvalue>
485485
</para></entry>
486486
</row>
@@ -497,7 +497,7 @@ Europe &amp; Russia*@ &amp; !Transportation
497497
from the end of the path.
498498
</para>
499499
<para>
500-
<literal>subpath('Top.Child1.Child2',1)</literal>
500+
<literal>subpath('Top.Child1.Child2', 1)</literal>
501501
<returnvalue>Child1.Child2</returnvalue>
502502
</para></entry>
503503
</row>
@@ -528,7 +528,7 @@ Europe &amp; Russia*@ &amp; !Transportation
528528
<parameter>a</parameter>, or -1 if not found.
529529
</para>
530530
<para>
531-
<literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6')</literal>
531+
<literal>index('0.1.2.3.5.4.5.6.8.5.6.8', '5.6')</literal>
532532
<returnvalue>6</returnvalue>
533533
</para></entry>
534534
</row>
@@ -546,7 +546,7 @@ Europe &amp; Russia*@ &amp; !Transportation
546546
start <parameter>-offset</parameter> labels from the end of the path.
547547
</para>
548548
<para>
549-
<literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-4)</literal>
549+
<literal>index('0.1.2.3.5.4.5.6.8.5.6.8', '5.6', -4)</literal>
550550
<returnvalue>9</returnvalue>
551551
</para></entry>
552552
</row>
@@ -584,7 +584,7 @@ Europe &amp; Russia*@ &amp; !Transportation
584584
(up to 8 arguments are supported).
585585
</para>
586586
<para>
587-
<literal>lca('1.2.3','1.2.3.4.5.6')</literal>
587+
<literal>lca('1.2.3', '1.2.3.4.5.6')</literal>
588588
<returnvalue>1.2</returnvalue>
589589
</para></entry>
590590
</row>

doc/src/sgml/mvcc.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ ERROR: could not serialize access due to read/write dependencies among transact
12461246
<para>
12471247
The <literal>FOR UPDATE</literal> lock mode
12481248
is also acquired by any <command>DELETE</command> on a row, and also by an
1249-
<command>UPDATE</command> that modifies the values on certain columns. Currently,
1249+
<command>UPDATE</command> that modifies the values of certain columns. Currently,
12501250
the set of columns considered for the <command>UPDATE</command> case are those that
12511251
have a unique index on them that can be used in a foreign key (so partial
12521252
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
@@ -471,7 +471,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
471471
</para>
472472

473473
<para>
474-
The following operations are always parallel restricted.
474+
The following operations are always parallel restricted:
475475
</para>
476476

477477
<itemizedlist>

0 commit comments

Comments
 (0)