From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: regexp_replace 'g' flag |
Date: | 2014-02-01 03:40:18 |
Message-ID: | 20140201034018.GF31141@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Thu, Sep 5, 2013 at 09:59:13PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Thu, Sep 5, 2013 at 08:37:44PM -0400, Bruce Momjian wrote:
> >> Why doesn't the 'g' flag appear in this table?
> >> http://www.postgresql.org/docs/9.2/static/functions-matching.html#POSIX-EMBEDDED-OPTIONS-TABLE
>
> > Is it because the table has generic pattern modififers and 'g' only is
> > relevant for regexp_replace? I assume so.
>
> The table is specifically about ARE options, and 'g' is *not* one of
> those. Adding 'g' to the table would be wrong.
>
> It does seem to me to be a bit confusing that the text description of
> substring() mentions 'i' and 'g' explicitly, when only 'i' is listed in
> the table. You could make a case for phrasing along the line of
> "substring() supports the 'g' flag that specifies ..., as well as all the
> flags listed in Table 9-19". On the other hand, 'i' is the most useful of
> the flags listed in the table by several country miles, and it doesn't
> seem quite right to make people go off and consult the table to find out
> about it.
>
> Not sure whether there's any real improvement that can be made here,
> but I suppose it'd be nice if the text descriptions of substring() and
> regexp_replace() handled this matter in the same way ...
I went ahead and just explicitly documented that 'g' is not in the
table.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
Attachment | Content-Type | Size |
---|---|---|
regex.diff | text/x-diff | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2014-02-01 09:49:50 | category of min_recovery_apply_delay |
Previous Message | Bruce Momjian | 2014-02-01 00:05:48 | Re: 9.3: mention checksum feature in "29.1. Reliability" |