@@ -2573,8 +2573,9 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
2573
2573
<returnvalue>integer</returnvalue>
2574
2574
</para>
2575
2575
<para>
2576
- Returns starting index of specified <parameter>substring</parameter>
2577
- within <parameter>string</parameter>, or zero if it's not present.
2576
+ Returns first starting index of the specified
2577
+ <parameter>substring</parameter> within
2578
+ <parameter>string</parameter>, or zero if it's not present.
2578
2579
</para>
2579
2580
<para>
2580
2581
<literal>position('om' in 'Thomas')</literal>
@@ -2617,7 +2618,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
2617
2618
<returnvalue>text</returnvalue>
2618
2619
</para>
2619
2620
<para>
2620
- Extracts substring matching POSIX regular expression; see
2621
+ Extracts the first substring matching POSIX regular expression; see
2621
2622
<xref linkend="functions-posix-regexp"/>.
2622
2623
</para>
2623
2624
<para>
@@ -2636,7 +2637,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
2636
2637
<returnvalue>text</returnvalue>
2637
2638
</para>
2638
2639
<para>
2639
- Extracts substring matching <acronym>SQL</acronym> regular expression;
2640
+ Extracts the first substring matching <acronym>SQL</acronym> regular expression;
2640
2641
see <xref linkend="functions-similarto-regexp"/>. The first form has
2641
2642
been specified since SQL:2003; the second form was only in SQL:1999
2642
2643
and should be considered obsolete.
@@ -3116,7 +3117,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3116
3117
<returnvalue>text[]</returnvalue>
3117
3118
</para>
3118
3119
<para>
3119
- Returns captured substring(s) resulting from the first match of a POSIX
3120
+ Returns captured substrings resulting from the first match of a POSIX
3120
3121
regular expression to the <parameter>string</parameter>; see
3121
3122
<xref linkend="functions-posix-regexp"/>.
3122
3123
</para>
@@ -3135,9 +3136,10 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3135
3136
<returnvalue>setof text[]</returnvalue>
3136
3137
</para>
3137
3138
<para>
3138
- Returns captured substring(s) resulting from matching a POSIX regular
3139
- expression to the <parameter>string</parameter>; see
3140
- <xref linkend="functions-posix-regexp"/>.
3139
+ Returns captured substrings resulting from the first match of a
3140
+ POSIX regular expression to the <parameter>string</parameter>,
3141
+ or multiple matches if the <literal>g</literal> flag is used;
3142
+ see <xref linkend="functions-posix-regexp"/>.
3141
3143
</para>
3142
3144
<para>
3143
3145
<literal>regexp_matches('foobarbequebaz', 'ba.', 'g')</literal>
@@ -3158,8 +3160,10 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3158
3160
<returnvalue>text</returnvalue>
3159
3161
</para>
3160
3162
<para>
3161
- Replaces substring(s) matching a POSIX regular expression; see
3162
- <xref linkend="functions-posix-regexp"/>.
3163
+ Replaces substrings resulting from the first match of a
3164
+ POSIX regular expression, or multiple substring matches
3165
+ if the <literal>g</literal> flag is used; see <xref
3166
+ linkend="functions-posix-regexp"/>.
3163
3167
</para>
3164
3168
<para>
3165
3169
<literal>regexp_replace('Thomas', '.[mN]a.', 'M')</literal>
@@ -3364,7 +3368,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
3364
3368
<returnvalue>integer</returnvalue>
3365
3369
</para>
3366
3370
<para>
3367
- Returns starting index of specified <parameter>substring</parameter>
3371
+ Returns first starting index of the specified <parameter>substring</parameter>
3368
3372
within <parameter>string</parameter>, or zero if it's not present.
3369
3373
(Same as <literal>position(<parameter>substring</parameter> in
3370
3374
<parameter>string</parameter>)</literal>, but note the reversed
@@ -3965,8 +3969,9 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
3965
3969
<returnvalue>integer</returnvalue>
3966
3970
</para>
3967
3971
<para>
3968
- Returns starting index of specified <parameter>substring</parameter>
3969
- within <parameter>bytes</parameter>, or zero if it's not present.
3972
+ Returns first starting index of the specified
3973
+ <parameter>substring</parameter> within
3974
+ <parameter>bytes</parameter>, or zero if it's not present.
3970
3975
</para>
3971
3976
<para>
3972
3977
<literal>position('\x5678'::bytea in '\x1234567890'::bytea)</literal>
@@ -4892,7 +4897,7 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
4892
4897
<returnvalue>integer</returnvalue>
4893
4898
</para>
4894
4899
<para>
4895
- Returns starting index of specified <parameter>substring</parameter>
4900
+ Returns first starting index of the specified <parameter>substring</parameter>
4896
4901
within <parameter>bits</parameter>, or zero if it's not present.
4897
4902
</para>
4898
4903
<para>
@@ -5518,7 +5523,7 @@ substring('foobar' similar '#"o_b#"%' escape '#') <lineannotation>NULL</linea
5518
5523
<replaceable>pattern</replaceable>)</function>, provides extraction of a
5519
5524
substring
5520
5525
that matches a POSIX regular expression pattern. It returns null if
5521
- there is no match, otherwise the portion of the text that matched the
5526
+ there is no match, otherwise the first portion of the text that matched the
5522
5527
pattern. But if the pattern contains any parentheses, the portion
5523
5528
of the text that matched the first parenthesized subexpression (the
5524
5529
one whose left parenthesis comes first) is
0 commit comments