Re: [HACKERS] [PATCHES] regexp_replace

2005-06-26 Thread Atsushi Ogawa
Bruce Momjian wrote: > Atsushi Ogawa wrote: > > I propose the following specification: > > > > regexp_replace(source text, pattern text, replacement text, [flags text]) > > returns text > > > > The flags can use the following values: > > g: global (replace all) > > i: ignore case > > > > When th

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-24 Thread Bruce Momjian
Atsushi Ogawa wrote: > I think that it is good to specify the flags by one character as well > as Perl. > > I propose the following specification: > > regexp_replace(source text, pattern text, replacement text, [flags text]) > returns text > > The flags can use the following values: > g: global

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-10 Thread Atsushi Ogawa
Tom Flavel wrote: > On 08/06/2005 21:57:29, Bruce Momjian wrote: > > Andrew Dunstan wrote: > > > > > > 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

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-08 Thread Tom Flavel
On 08/06/2005 21:57:29, Bruce Momjian wrote: > Andrew Dunstan wrote: > > 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

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-08 Thread Bruce Momjian
Andrew Dunstan wrote: > 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 i

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-08 Thread Andrew Dunstan
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. T

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-08 Thread Bruce Momjian
Robert Treat wrote: > On Tuesday 07 June 2005 10:57, David Fetter wrote: > > On Tue, Jun 07, 2005 at 10:27:28PM +0900, Atsushi Ogawa wrote: > > > My idea is opposite. I think that the regexp_replace() should make > > > "replace all" a default. Because the replace() of pgsql replaces all > > > strin

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-08 Thread Robert Treat
On Tuesday 07 June 2005 10:57, David Fetter wrote: > On Tue, Jun 07, 2005 at 10:27:28PM +0900, Atsushi Ogawa wrote: > > My idea is opposite. I think that the regexp_replace() should make > > "replace all" a default. Because the replace() of pgsql replaces all > > string, and regexp_replace() of ora

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-08 Thread Hannu Krosing
On K, 2005-06-08 at 21:32 +0900, Atsushi Ogawa wrote: > > 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 cas

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-08 Thread Atsushi Ogawa
David Fetter wrote: > On Tue, Jun 07, 2005 at 10:27:28PM +0900, Atsushi Ogawa wrote: > > David Fetter wrote: > > > Ogawa-san, > > > > > > I think that this would be a case for function overloading: > > > > > > function regexp_replace( > > > string text, pattern text, replacement text > > > ) R

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-07 Thread David Fetter
On Tue, Jun 07, 2005 at 10:27:28PM +0900, Atsushi Ogawa wrote: > > David Fetter wrote: > > On Tue, Jun 07, 2005 at 09:35:56AM +0900, a_ogawa wrote: > > > David Fetter wrote: > > > > We don't yet have this functionality, as the patch allows for > > > > using second and later regex matches "()" in t

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-07 Thread Atsushi Ogawa
David Fetter wrote: > On Tue, Jun 07, 2005 at 09:35:56AM +0900, a_ogawa wrote: > > David Fetter wrote: > > > We don't yet have this functionality, as the patch allows for > > > using second and later regex matches "()" in the replacement > > > pattern. > > > > > > The function is misnamed. It sho

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-06 Thread David Fetter
On Tue, Jun 07, 2005 at 09:35:56AM +0900, a_ogawa wrote: > > Bruce Momjian wrote: > > David Fetter wrote: > > > On Mon, Jun 06, 2005 at 12:02:18PM -0400, Bruce Momjian wrote: > > > > > > > > Patch removed because we already have this functionality. > > > > > > We don't yet have this functionality,

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-06 Thread a_ogawa
Bruce Momjian wrote: > David Fetter wrote: > > On Mon, Jun 06, 2005 at 12:02:18PM -0400, Bruce Momjian wrote: > > > > > > Patch removed because we already have this functionality. > > > > We don't yet have this functionality, as the patch allows for using > > second and later regex matches "()" in

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-06 Thread Bruce Momjian
David Fetter wrote: > On Mon, Jun 06, 2005 at 12:02:18PM -0400, Bruce Momjian wrote: > > > > Patch removed because we already have this functionality. > > We don't yet have this functionality, as the patch allows for using > second and later regex matches "()" in the replacement pattern. > > The

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-06 Thread David Fetter
On Mon, Jun 06, 2005 at 12:02:18PM -0400, Bruce Momjian wrote: > > Patch removed because we already have this functionality. We don't yet have this functionality, as the patch allows for using second and later regex matches "()" in the replacement pattern. The function is misnamed. It should be