From: | "Andrew Dunstan" <andrew(at)dunslane(dot)net> |
---|---|
To: | <a_ogawa(at)hi-ho(dot)ne(dot)jp> |
Cc: | <david(at)fetter(dot)org>, <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCHES] regexp_replace |
Date: | 2005-06-08 22:32:12 |
Message-ID: | 52654.203.26.206.130.1118269932.squirrel@www.dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Atsushi Ogawa said:
>
> How about changing the function name of each usage?
>
> regexp_replace: replace first
> regexp_replace_all: replace all
> regexp_ic_replace: replace first and case insensitive
> regexp_ic_replace_all: replace all and case insensitive
>
That's just horrible. The number of function names will double with each
supported flag (e.g. I'd like to see extended regexes supported).
surely somthing like
foo_replace (source text, pattern text, replacement text, flags text)
returns text
would fit the bill. OK, it reflects my Perl prejudices, but that looks more
natural to me. You could overload it so that the flags default to none
(which would be case sensitive, replace the first instance only, among other
things).
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew D. Fuller | 2005-06-08 22:54:08 | Re: The Contrib Roundup (long) |
Previous Message | John Gray | 2005-06-08 22:28:09 | Re: The Contrib Roundup (long) |
From | Date | Subject | |
---|---|---|---|
Next Message | Gavin Sherry | 2005-06-08 23:38:49 | Re: ALTER SCHEMA ... SET TABLESPACE |
Previous Message | Alvaro Herrera | 2005-06-08 20:37:56 | Re: Are you actively hacking on 2PC? |