Re: syntax error in plperl wrapper for Perl regex replace. - Mailing list pgsql-novice

From Tom Lane
Subject Re: syntax error in plperl wrapper for Perl regex replace.
Date
Msg-id 26555.1535077030@sss.pgh.pa.us
Whole thread Raw
In response to Re: syntax error in plperl wrapper for Perl regex replace.  ("io.sys" <io.sys@post.cz>)
Responses Re: syntax error in plperl wrapper for Perl regex replace.  ("io.sys" <io.sys@post.cz>)
List pgsql-novice
"io.sys" <io.sys@post.cz> writes:
> I just tried to use function parameters $_[1], $_[2], $_[3] instead fixed strings.
> However, it is rejected by postgre as syntax error.

That's not a Postgres problem, it's a Perl problem.  I'm no Perl
expert, but I think if you study the Perl docs carefully you will
find there are restrictions on what sorts of variable references
can be interpolated into a regexp ... and a subscripted reference
probably doesn't qualify.

            regards, tom lane


pgsql-novice by date:

Previous
From: "io.sys"
Date:
Subject: Re: syntax error in plperl wrapper for Perl regex replace.
Next
From: "io.sys"
Date:
Subject: Re: syntax error in plperl wrapper for Perl regex replace.