Package namespace and Safe init cleanup for plperl UPDATE 3 [PATCH]

Поиск
Список
Период
Сортировка
От Tim Bunce
Тема Package namespace and Safe init cleanup for plperl UPDATE 3 [PATCH]
Дата
Msg-id 20100130231608.GI1141@timac.local
обсуждение исходный текст
Ответы Re: Package namespace and Safe init cleanup for plperl UPDATE 3 [PATCH]  (Alex Hunsaker <badalex@gmail.com>)
Список pgsql-hackers
This is an update to the final plperl patch in the series from me.

Changes in the original patch:

- Moved internal functions out of main:: namespace
    into PostgreSQL::InServer and PostgreSQL::InServer::safe

- Restructured Safe compartment setup code
    to generalize and separate the data from the logic.

Neither change has any user visible effects.

Additional changes in the second version:

- Further generalized the 'what to load into Safe compartment' logic.

- Added the 'warnings' pragma to the list of modules to load into Safe.
  So plperl functions can now "use warnings;" - added test for that.

- Added 'use 5.008001;' to plc_perlboot.pl as a run-time check to
  complement the configure-time check added by Tom Lane recently.

Additional changes in this version:

- Rebased over recent HEAD plus "on_trusted_init" patch

- Made plc_safe_ok.pl code idempotent to avoid risk of problems
  from repeated initialization attempts e.g. if on_trusted_init code
  throws an exception so initialization doesn't complete.

- Fixed 'require strict' to enable 'caller' opcode
  (needed for Perl >=5.10)

- Ensure Safe container opmask is restored even if @EvalInSafe code
  throws an exception.

- Changed errmsg("didn't get a GLOB ...") to use errmsg_internal().

Tim.

Вложения

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

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: Re: development setup and libdir
Следующее
От: Greg Smith
Дата:
Сообщение: Re: development setup and libdir