@@ -2626,8 +2626,9 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
2626
2626
<returnvalue>integer</returnvalue>
2627
2627
</para>
2628
2628
<para>
2629
- Returns starting index of specified <parameter>substring</parameter>
2630
- within <parameter>string</parameter>, or zero if it's not present.
2629
+ Returns first starting index of the specified
2630
+ <parameter>substring</parameter> within
2631
+ <parameter>string</parameter>, or zero if it's not present.
2631
2632
</para>
2632
2633
<para>
2633
2634
<literal>position('om' in 'Thomas')</literal>
@@ -2670,7 +2671,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
2670
2671
<returnvalue>text</returnvalue>
2671
2672
</para>
2672
2673
<para>
2673
- Extracts substring matching POSIX regular expression; see
2674
+ Extractsthe first substring matching POSIX regular expression; see
2674
2675
<xref linkend="functions-posix-regexp"/>.
2675
2676
</para>
2676
2677
<para>
@@ -2685,7 +2686,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
2685
2686
<returnvalue>text</returnvalue>
2686
2687
</para>
2687
2688
<para>
2688
- Extracts substring matching <acronym>SQL</acronym> regular expression;
2689
+ Extractsthe first substring matching <acronym>SQL</acronym> regular expression;
2689
2690
see <xref linkend="functions-similarto-regexp"/>.
2690
2691
</para>
2691
2692
<para>
@@ -3163,7 +3164,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3163
3164
<returnvalue>text[]</returnvalue>
3164
3165
</para>
3165
3166
<para>
3166
- Returns capturedsubstring(s) resulting from the first match of a POSIX
3167
+ Returns capturedsubstrings resulting from the first match of a POSIX
3167
3168
regular expression to the <parameter>string</parameter>; see
3168
3169
<xref linkend="functions-posix-regexp"/>.
3169
3170
</para>
@@ -3182,9 +3183,10 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3182
3183
<returnvalue>setof text[]</returnvalue>
3183
3184
</para>
3184
3185
<para>
3185
- Returns captured substring(s) resulting from matching a POSIX regular
3186
- expression to the <parameter>string</parameter>; see
3187
- <xref linkend="functions-posix-regexp"/>.
3186
+ Returns captured substrings resulting from the first match of a
3187
+ POSIX regular expression to the <parameter>string</parameter>,
3188
+ or multiple matches if the <literal>g</literal> flag is used;
3189
+ see <xref linkend="functions-posix-regexp"/>.
3188
3190
</para>
3189
3191
<para>
3190
3192
<literal>regexp_matches('foobarbequebaz', 'ba.', 'g')</literal>
@@ -3205,8 +3207,10 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3205
3207
<returnvalue>text</returnvalue>
3206
3208
</para>
3207
3209
<para>
3208
- Replaces substring(s) matching a POSIX regular expression; see
3209
- <xref linkend="functions-posix-regexp"/>.
3210
+ Replaces substrings resulting from the first match of a
3211
+ POSIX regular expression, or multiple substring matches
3212
+ if the <literal>g</literal> flag is used; see <xref
3213
+ linkend="functions-posix-regexp"/>.
3210
3214
</para>
3211
3215
<para>
3212
3216
<literal>regexp_replace('Thomas', '.[mN]a.', 'M')</literal>
@@ -3405,7 +3409,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3405
3409
<returnvalue>integer</returnvalue>
3406
3410
</para>
3407
3411
<para>
3408
- Returns starting index of specified <parameter>substring</parameter>
3412
+ Returnsfirst starting index of the specified <parameter>substring</parameter>
3409
3413
within <parameter>string</parameter>, or zero if it's not present.
3410
3414
(Same as <literal>position(<parameter>substring</parameter> in
3411
3415
<parameter>string</parameter>)</literal>, but note the reversed
@@ -3905,8 +3909,9 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
3905
3909
<returnvalue>integer</returnvalue>
3906
3910
</para>
3907
3911
<para>
3908
- Returns starting index of specified <parameter>substring</parameter>
3909
- within <parameter>bytes</parameter>, or zero if it's not present.
3912
+ Returns first starting index of the specified
3913
+ <parameter>substring</parameter> within
3914
+ <parameter>bytes</parameter>, or zero if it's not present.
3910
3915
</para>
3911
3916
<para>
3912
3917
<literal>position('\x5678'::bytea in '\x1234567890'::bytea)</literal>
@@ -4751,7 +4756,7 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
4751
4756
<returnvalue>integer</returnvalue>
4752
4757
</para>
4753
4758
<para>
4754
- Returns starting index of specified <parameter>substring</parameter>
4759
+ Returnsfirst starting index of the specified <parameter>substring</parameter>
4755
4760
within <parameter>bits</parameter>, or zero if it's not present.
4756
4761
</para>
4757
4762
<para>
@@ -5373,7 +5378,7 @@ substring('foobar' from '#"o_b#"%' for '#') <lineannotation>NULL</lineannotat
5373
5378
<replaceable>pattern</replaceable>)</function>, provides extraction of a
5374
5379
substring
5375
5380
that matches a POSIX regular expression pattern. It returns null if
5376
- there is no match, otherwise the portion of the text that matched the
5381
+ there is no match, otherwise thefirst portion of the text that matched the
5377
5382
pattern. But if the pattern contains any parentheses, the portion
5378
5383
of the text that matched the first parenthesized subexpression (the
5379
5384
one whose left parenthesis comes first) is