Re: plperl strict mode

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: plperl strict mode
Дата
Msg-id 42934E09.5070305@dunslane.net
обсуждение исходный текст
Ответ на Re: plperl strict mode  (Alvaro Herrera <alvherre@surnet.cl>)
Ответы Re: plperl strict mode
Список pgsql-patches

Alvaro Herrera wrote:

>On Sat, May 21, 2005 at 04:04:36PM -0400, Andrew Dunstan wrote:
>
>Andrew,
>
>
>
>>it works like this:
>>
>>andrew=# create or replace function foo() returns text language plperl
>>as $$ $x = 1; return 'hello'; $$;
>>CREATE FUNCTION
>>andrew=# select foo();
>>ERROR:  creation of Perl function failed: Global symbol "$x" requires
>>explicit package name at (eval 11) line 1.
>>
>>
>
>Hmm, is there a way to have a validator function and have the strict
>check at function creation too?  I know these things are reported with
>perl -c, not sure if they can be reached with the C interface.
>
>
>
>

Maybe I have missed it, but I don't see an exposed interface that is
called when we create a function, only one to set up the interpreter and
one where we call the function (which compiles it if it isn't already
compiled).  If there is some way that we can force a call into the
module when a CREATE OR REPLACE FUNCTION is issued, then it should be
quite possible to get compile errors. That would strike me as being a
very good thing.

cheers

andrew

В списке pgsql-patches по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: [PATCH] pg_autovacuum commandline password hiding.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: plperl strict mode