From: Tom Lane Date: Sat, 27 Jul 2024 19:38:54 +0000 (-0400) Subject: Doc: fix text's description of regexp_replace's arguments. X-Git-Tag: REL_18_BETA1~2292 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=da4017a694de0610bd5b3a54adda311e46e26300;p=postgresql.git Doc: fix text's description of regexp_replace's arguments. Section 9.7.3 had a syntax synopsis for regexp_replace() that was different from Table 9.10's, but still wrong. Update that one too. Oversight in 580f8727c. Jian He Discussion: https://postgr.es/m/CACJufxG3NFKKsh6x4fRLv8h3V-HvN4W5dA=zNKMxsNcDwOKang@mail.gmail.com --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index b669ab7f977..b39f97dc8de 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -3426,7 +3426,7 @@ SELECT NOT(ROW(table.*) IS NOT NULL) FROM TABLE; -- detect at least one null in regexp_replace regexp_replace ( string text, pattern text, replacement text - [, flags text ] ) + , flags text ) text @@ -3445,8 +3445,8 @@ SELECT NOT(ROW(table.*) IS NOT NULL) FROM TABLE; -- detect at least one null in regexp_replace ( string text, pattern text, replacement text, start integer - [, N integer - [, flags text ] ] ) + , N integer + , flags text ) text @@ -6117,13 +6117,13 @@ SELECT col1, (SELECT regexp_matches(col2, '(bar)(beque)')) FROM tab; It has the syntax regexp_replace(string, pattern, replacement - , start + , flags ) + or + regexp_replace(string, + pattern, replacement, + start , N - - , flags ). - (Notice that N cannot be specified - unless start is, - but flags can be given in any case.) + , flags ). The source string is returned unchanged if there is no match to the pattern. If there is a match, the string is returned with the