Re: syntax error in plperl wrapper for Perl regex replace.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: syntax error in plperl wrapper for Perl regex replace.
Дата
Msg-id 26555.1535077030@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: syntax error in plperl wrapper for Perl regex replace.  ("io.sys" <io.sys@post.cz>)
Ответы Re: syntax error in plperl wrapper for Perl regex replace.  ("io.sys" <io.sys@post.cz>)
Список 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 по дате отправления:

Предыдущее
От: "io.sys"
Дата:
Сообщение: Re: syntax error in plperl wrapper for Perl regex replace.
Следующее
От: "io.sys"
Дата:
Сообщение: Re: syntax error in plperl wrapper for Perl regex replace.