Re: [PATCHES] regexp_replace

2005-07-28 Thread Bruce Momjian
Patch applied. Thanks. --- Atsushi Ogawa wrote: > > Bruce Momjian wrote: > > I have applied your patch, with slight adjustments in spacing and > > documentation. > > > > Patch applied. Thanks. > > Thank you for applying

Re: [PATCHES] regexp_replace

2005-07-11 Thread Atsushi Ogawa
Bruce Momjian wrote: > I have applied your patch, with slight adjustments in spacing and > documentation. > > Patch applied. Thanks. Thank you for applying patch. An attached patch is a small additional improvement. This patch use appendStringInfoText instead of appendStringInfoString. There

Re: [PATCHES] regexp_replace

2005-07-10 Thread Andrew Dunstan
The change below has broken tsearch2. See for example http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=shrew&dt=2005-07-10%2015:02:01 cheers andrew Bruce Momjian wrote: I have applied your patch, with slight adjustments in spacing and documentation. Patch applied. Thanks. [snip]

Re: [PATCHES] regexp_replace

2005-07-09 Thread Bruce Momjian
I have applied your patch, with slight adjustments in spacing and documentation. Patch applied. Thanks. --- Atsushi Ogawa wrote: > > I made the patch that implements regexp_replace again. > The specification of this func

Re: [PATCHES] regexp_replace

2005-06-28 Thread Pavel Stehule
> > pg_catalog | replace | text | text, text, text > > > > I think that regexp_replace is a good name. It is easy to understand. > > regards, I prefere this name too Regards Pavel Stehule ---(end of broadcast)--- TIP 8: explain ana

Re: [PATCHES] regexp_replace

2005-06-28 Thread Andrew Dunstan
Atsushi Ogawa wrote: I think that regexp_replace is a good name. It is easy to understand. I'll go with the flow. cheers andrew ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [PATCHES] regexp_replace

2005-06-28 Thread Atsushi Ogawa
Bruce Momjian wrote: > Andrew Dunstan wrote: > > I'm very glad to see this. But is a nicer name possible? To perl > > programmers at least, "substitute" should make sense. > > What is the matter with replace? We already have replace: > > test=> \df replace >List of funct

Re: [PATCHES] regexp_replace

2005-06-27 Thread Bruce Momjian
Andrew Dunstan wrote: > I'm very glad to see this. But is a nicer name possible? To perl > programmers at least, "substitute" should make sense. What is the matter with replace? We already have replace: test=> \df replace List of functions Schema | Name | Result d

Re: [PATCHES] regexp_replace

2005-06-27 Thread Andrew Dunstan
I'm very glad to see this. But is a nicer name possible? To perl programmers at least, "substitute" should make sense. cheers andrew Atsushi Ogawa wrote: >I made the patch that implements regexp_replace again. >The specification of this function is as follows. > >regexp_replace(source text, p

[PATCHES] regexp_replace

2005-06-27 Thread Atsushi Ogawa
I made the patch that implements regexp_replace again. The specification of this function is as follows. regexp_replace(source text, pattern text, replacement text, [flags text]) returns text Replace string that matches to regular expression in source text to replacement text. - pattern is r

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-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: [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: [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

Re: [PATCHES] regexp_replace

2005-06-06 Thread Bruce Momjian
Nice. Patch removed. --- Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> Don't we have this functionality already? It's even SQL-spec ... > > > Uh, all I see it replace(), which isn't regex: > > The SQL-

Re: [PATCHES] regexp_replace

2005-06-06 Thread Bruce Momjian
Patch removed because we already have this functionality. --- a_ogawa00 wrote: > > This patch provides a new function regexp_replace. > regexp_replace extends a replace function and enables text search > by the regular expr

Re: [PATCHES] regexp_replace

2005-06-06 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> Don't we have this functionality already? It's even SQL-spec ... > Uh, all I see it replace(), which isn't regex: The SQL-spec function is substring(string from pattern for escape-char); see http://www.postgresql.org/docs/8.0/static/functions-matching

Re: [PATCHES] regexp_replace

2005-06-06 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Your patch has been added to the PostgreSQL unapplied patches list at: > > > a_ogawa00 wrote: > >> This patch provides a new function regexp_replace. > >> regexp_replace extends a replace function and enables text search > >> by the regular expression.

Re: [PATCHES] regexp_replace

2005-06-04 Thread Tom Lane
Bruce Momjian writes: > Your patch has been added to the PostgreSQL unapplied patches list at: > a_ogawa00 wrote: >> This patch provides a new function regexp_replace. >> regexp_replace extends a replace function and enables text search >> by the regular expression. And, a back reference can be u

Re: [PATCHES] regexp_replace

2005-06-04 Thread Bruce Momjian
I will add the documentation and make sure your oids are not duplicates. Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --

Re: [PATCHES] regexp_replace

2004-08-06 Thread Bruce Momjian
This has been saved for the 8.1 release: http:/momjian.postgresql.org/cgi-bin/pgpatches2 --- a_ogawa00 wrote: > > This patch provides a new function regexp_replace. > regexp_replace extends a replace function and e

[PATCHES] regexp_replace

2004-07-25 Thread a_ogawa00
This patch provides a new function regexp_replace. regexp_replace extends a replace function and enables text search by the regular expression. And, a back reference can be used within a replace string. (This patch for PostgreSQL 7.4.3) Function: regexp_replace(str, pattern,