Doc: fix text's description of regexp_replace's arguments.
authorTom Lane
Sat, 27 Jul 2024 19:38:54 +0000 (15:38 -0400)
committerTom Lane
Sat, 27 Jul 2024 19:38:54 +0000 (15:38 -0400)
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

doc/src/sgml/func.sgml

index b669ab7f97765ea3a3259813482cae7f10d3ef9d..b39f97dc8de2509bdf2d9af3550ae7ff5bd61746 100644 (file)
@@ -3426,7 +3426,7 @@ SELECT NOT(ROW(table.*) IS NOT NULL) FROM TABLE; -- detect at least one null in
          regexp_replace
         
         regexp_replace ( string textpattern textreplacement 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 textpattern textreplacement 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,
      patternreplacement
-     start
+     flags )
+     or
+     regexp_replace(string,
+     patternreplacement,
+     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