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

Commit c5f42da

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 2a972e0 commit c5f42da

19 files changed

+69
-69
lines changed

doc/src/sgml/catalogs.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@
15251525
</para>
15261526
<para>
15271527
Role can log in. That is, this role can be given as the initial
1528-
session authorization identifier
1528+
session authorization identifier.
15291529
</para></entry>
15301530
</row>
15311531

doc/src/sgml/config.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10168,8 +10168,8 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
1016810168
</term>
1016910169
<listitem>
1017010170
<para>
10171-
If set, do not trace locks for tables below this OID. (use to avoid
10172-
output on system tables)
10171+
If set, do not trace locks for tables below this OID (used to avoid
10172+
output on system tables).
1017310173
</para>
1017410174
<para>
1017510175
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>

doc/src/sgml/dblink.sgml

+4-4
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

+16-16
Original file line numberDiff line numberDiff line change
@@ -15034,7 +15034,7 @@ table2-mapping
1503415034
per <function>to_json</function> or <function>to_jsonb</function>.
1503515035
</para>
1503615036
<para>
15037-
<literal>json_build_array(1,2,'foo',4,5)</literal>
15037+
<literal>json_build_array(1, 2, 'foo', 4, 5)</literal>
1503815038
<returnvalue>[1, 2, "foo", 4, 5]</returnvalue>
1503915039
</para></entry>
1504015040
</row>
@@ -15061,7 +15061,7 @@ table2-mapping
1506115061
per <function>to_json</function> or <function>to_jsonb</function>.
1506215062
</para>
1506315063
<para>
15064-
<literal>json_build_object('foo',1,2,row(3,'bar'))</literal>
15064+
<literal>json_build_object('foo', 1, 2, row(3,'bar'))</literal>
1506515065
<returnvalue>{"foo" : 1, "2" : {"f1":3,"f2":"bar"}}</returnvalue>
1506615066
</para></entry>
1506715067
</row>
@@ -15093,7 +15093,7 @@ table2-mapping
1509315093
<literal>json_object('{a, 1, b, "def", c, 3.5}')</literal>
1509415094
<returnvalue>{"a" : "1", "b" : "def", "c" : "3.5"}</returnvalue>
1509515095
</para>
15096-
<para><literal>json_object('{{a, 1},{b, "def"},{c, 3.5}}')</literal>
15096+
<para><literal>json_object('{{a, 1}, {b, "def"}, {c, 3.5}}')</literal>
1509715097
<returnvalue>{"a" : "1", "b" : "def", "c" : "3.5"}</returnvalue>
1509815098
</para></entry>
1509915099
</row>
@@ -15113,7 +15113,7 @@ table2-mapping
1511315113
the one-argument form.
1511415114
</para>
1511515115
<para>
15116-
<literal>json_object('{a, b}', '{1,2}')</literal>
15116+
<literal>json_object('{a,b}', '{1,2}')</literal>
1511715117
<returnvalue>{"a": "1", "b": "2"}</returnvalue>
1511815118
</para></entry>
1511915119
</row>
@@ -15504,7 +15504,7 @@ table2-mapping
1550415504
<literal>create type twoints as (a int, b int);</literal>
1550515505
</para>
1550615506
<para>
15507-
<literal>select * from json_populate_recordset(null::twoints, '[{"a":1,"b":2},{"a":3,"b":4}]')</literal>
15507+
<literal>select * from json_populate_recordset(null::twoints, '[{"a":1,"b":2}, {"a":3,"b":4}]')</literal>
1550815508
<returnvalue></returnvalue>
1550915509
<programlisting>
1551015510
a | b
@@ -15579,7 +15579,7 @@ table2-mapping
1557915579
for <function>json[b]_populate_record</function>.
1558015580
</para>
1558115581
<para>
15582-
<literal>select * from json_to_recordset('[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]') as x(a int, b text)</literal>
15582+
<literal>select * from json_to_recordset('[{"a":1,"b":"foo"}, {"a":"2","c":"bar"}]') as x(a int, b text)</literal>
1558315583
<returnvalue></returnvalue>
1558415584
<programlisting>
1558515585
a | b
@@ -15617,11 +15617,11 @@ table2-mapping
1561715617
or at the end of the array if it is positive.
1561815618
</para>
1561915619
<para>
15620-
<literal>jsonb_set('[{"f1":1,"f2":null},2,null,3]', '{0,f1}','[2,3,4]', false)</literal>
15620+
<literal>jsonb_set('[{"f1":1,"f2":null},2,null,3]', '{0,f1}', '[2,3,4]', false)</literal>
1562115621
<returnvalue>[{"f1": [2, 3, 4], "f2": null}, 2, null, 3]</returnvalue>
1562215622
</para>
1562315623
<para>
15624-
<literal>jsonb_set('[{"f1":1,"f2":null},2]', '{0,f3}','[2,3,4]')</literal>
15624+
<literal>jsonb_set('[{"f1":1,"f2":null},2]', '{0,f3}', '[2,3,4]')</literal>
1562515625
<returnvalue>[{"f1": 1, "f2": null, "f3": [2, 3, 4]}, 2]</returnvalue>
1562615626
</para></entry>
1562715627
</row>
@@ -15713,7 +15713,7 @@ table2-mapping
1571315713
untouched.
1571415714
</para>
1571515715
<para>
15716-
<literal>json_strip_nulls('[{"f1":1,"f2":null},2,null,3]')</literal>
15716+
<literal>json_strip_nulls('[{"f1":1, "f2":null}, 2, null, 3]')</literal>
1571715717
<returnvalue>[{"f1":1},2,null,3]</returnvalue>
1571815718
</para></entry>
1571915719
</row>
@@ -15737,7 +15737,7 @@ table2-mapping
1573715737
as the <literal>@?</literal> and <literal>@@</literal> operators do.
1573815738
</para>
1573915739
<para>
15740-
<literal>jsonb_path_exists('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
15740+
<literal>jsonb_path_exists('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
1574115741
<returnvalue>t</returnvalue>
1574215742
</para></entry>
1574315743
</row>
@@ -15759,7 +15759,7 @@ table2-mapping
1575915759
for <function>jsonb_path_exists</function>.
1576015760
</para>
1576115761
<para>
15762-
<literal>jsonb_path_match('{"a":[1,2,3,4,5]}', 'exists($.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max))', '{"min":2,"max":4}')</literal>
15762+
<literal>jsonb_path_match('{"a":[1,2,3,4,5]}', 'exists($.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max))', '{"min":2, "max":4}')</literal>
1576315763
<returnvalue>t</returnvalue>
1576415764
</para></entry>
1576515765
</row>
@@ -15780,7 +15780,7 @@ table2-mapping
1578015780
for <function>jsonb_path_exists</function>.
1578115781
</para>
1578215782
<para>
15783-
<literal>select * from jsonb_path_query('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
15783+
<literal>select * from jsonb_path_query('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
1578415784
<returnvalue></returnvalue>
1578515785
<programlisting>
1578615786
jsonb_path_query
@@ -15808,7 +15808,7 @@ table2-mapping
1580815808
for <function>jsonb_path_exists</function>.
1580915809
</para>
1581015810
<para>
15811-
<literal>jsonb_path_query_array('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
15811+
<literal>jsonb_path_query_array('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
1581215812
<returnvalue>[2, 3, 4]</returnvalue>
1581315813
</para></entry>
1581415814
</row>
@@ -15830,7 +15830,7 @@ table2-mapping
1583015830
for <function>jsonb_path_exists</function>.
1583115831
</para>
1583215832
<para>
15833-
<literal>jsonb_path_query_first('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
15833+
<literal>jsonb_path_query_first('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
1583415834
<returnvalue>2</returnvalue>
1583515835
</para></entry>
1583615836
</row>
@@ -15902,7 +15902,7 @@ table2-mapping
1590215902
Converts the given JSON value to pretty-printed, indented text.
1590315903
</para>
1590415904
<para>
15905-
<literal>jsonb_pretty('[{"f1":1,"f2":null},2]')</literal>
15905+
<literal>jsonb_pretty('[{"f1":1,"f2":null}, 2]')</literal>
1590615906
<returnvalue></returnvalue>
1590715907
<programlisting>
1590815908
[
@@ -26599,7 +26599,7 @@ BEGIN
2659926599
obj.object_name,
2660026600
obj.object_identity;
2660126601
END LOOP;
26602-
END
26602+
END;
2660326603
$$;
2660426604
CREATE EVENT TRIGGER test_event_trigger_for_drops
2660526605
ON sql_drop

doc/src/sgml/gin.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@
612612
</para>
613613
<para>
614614
<varname>gin_pending_list_limit</varname> can be overridden for individual
615-
GIN indexes by changing storage parameters, and which allows each
615+
GIN indexes by changing storage parameters, which allows each
616616
GIN index to have its own cleanup threshold.
617617
For example, it's possible to increase the threshold only for the GIN
618618
index which can be updated heavily, and decrease it otherwise.

doc/src/sgml/high-availability.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
15021502
Note that in this mode, the server will apply WAL one file at a
15031503
time, so if you use the standby server for queries (see Hot Standby),
15041504
there is a delay between an action in the primary and when the
1505-
action becomes visible in the standby, corresponding the time it takes
1505+
action becomes visible in the standby, corresponding to the time it takes
15061506
to fill up the WAL file. <varname>archive_timeout</varname> can be used to make that delay
15071507
shorter. Also note that you can't combine streaming replication with
15081508
this method.

doc/src/sgml/hstore.sgml

+5-5
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ amgettuple (IndexScanDesc scan,
612612
will pass the caller's snapshot test. On success, <function>amgettuple</function>
613613
must also set <literal>scan-&gt;xs_recheck</literal> to true or false.
614614
False means it is certain that the index entry matches the scan keys.
615-
true means this is not certain, and the conditions represented by the
615+
True means this is not certain, and the conditions represented by the
616616
scan keys must be rechecked against the heap tuple after fetching it.
617617
This provision supports <quote>lossy</quote> index operators.
618618
Note that rechecking will extend only to the scan conditions; a partial

doc/src/sgml/isn.sgml

+1-1
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

+6-6
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

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

doc/src/sgml/parallel.sgml

+1-1
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)