Re: Limitations in PL/perl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Limitations in PL/perl
Date: 2003-03-19 05:15:47
Message-ID: 4140.1048050947@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> Is there any documentation anywhere on what subset of Perl functionality is
> supported by PL/perl? I've had a lot of annoying trial-and-error sessions
> lately where I'll try something that works on the command line only to find
> out that it silently fails in PL/perl.

> For example:
> On the command line:
> $some_text =~ s/\W|\s//g;
> ... works great to remove all punctuation and spaces in a string.

> But in PL/perl, I have to use:
> $some_text =~ s/[^A-Za-z0-9]/""/eg;

AFAIK, either of these should work in plperl. Did you remember to
double those backslashes while entering the function text?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2003-03-19 05:17:12 Re: Limitations in PL/perl
Previous Message Tom Lane 2003-03-19 04:59:13 Re: insert aliases?