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 > > > string, and regexp_replace() of oracle10g is also similar. > > > > I respectfully disagree. Although Oracle does things this way, no > > other regular expression search and replace does. Historically, you > > can find that "Oracle does it this way" is not a reason why we would > > do it. Text editors, programming languages, etc., etc. do "replace > > the first" by default and "replace globally" only when told to. > > > > You don't think it will be confusing to have a function called replace which > replaces all occurrences and a function called regex_replace which only > replaces the first occurance? There's something to be said for consitancy > within pgsql itself.
Huh? I am confused. Why if both support regex, why does regex_replace only do the first one? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings