Bruno Wolff III <bruno@wolff.to> writes:
> It just seemed that things would be simpler to write and understand if
> I could have used a perl like substitution function.
Why do you want a "perl-like" substitution function when you have real
Perl available?
CREATE FUNCTION perlsub(text, text, text) RETURNS text AS '
my ($data, $pat, $repl) = $_;
$data =~ s/$pat/$repl/;
return $data
' LANGUAGE 'plperl';
(I'm not much of a Perl expert, but I think this is right.)
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Added to TODO:
> * Add sed-like regular expression search/replace capability
I fail to understand this enthusiam for building our own wheel, when
we already have a Formula I racer at hand. Two of them, in fact.
regards, tom lane