Re: Pl/Python -- current maintainer?

Поиск
Список
Период
Сортировка
От James William Pye
Тема Re: Pl/Python -- current maintainer?
Дата
Msg-id 20060226214527.GC53835@lit.jwp.name
обсуждение исходный текст
Ответ на Re: Pl/Python -- current maintainer?  ("Michael Paesold" <mpaesold@gmx.at>)
Список pgsql-hackers
On Sun, Feb 26, 2006 at 07:36:01PM +0100, Michael Paesold wrote:
> SET check_function_bodies = off;

Hrm, thanks for pointing that out. However, this, thankfully, does not appear
to inhibit the validator at all. Rather, the PL's validator is left with the job
to respect it if need be:

jwp=# select version();                                            version

------------------------------------------------------------------------------------
-------------PostgreSQL 8.1.3 on i386-unknown-freebsd6.1, compiled by GCC gcc (GCC) 3.4.4 [FreeB
SD] 20050518
(1 row)

jwp=# set check_function_bodies = off;
SET
jwp=# SHOW check_function_bodies ;check_function_bodies
-----------------------off
(1 row)

jwp=# CREATE FUNCTION test() RETURNS int LANGUAGE python AS 'return 1';
CREATE FUNCTION
jwp=# SELECT prolang, probin FROM pg_proc WHERE proname = 'test';prolang |

probin

---------+--------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
--------------------------------------------------------------------------------  16390 |
c\002\000\000\000\002\000\000\000\001\000\000\000C\000\000\000s\004\000\0
00\000d\001\000S(\002\000\000\000Ni\001\000\000\000(\000\000\000\000(\002\000\000\00
0s\004\000\000\000selfs\004\000\000\000args(\000\000\000\000(\000\000\000\000s\005\0
00\000\00069121s\006\000\000\000test()\002\000\000\000s\002\000\000\000\000\001
(1 row)

jwp=# SELECT test();test
------   1
(1 row)
^D


This is a good thing, IMO. Python primarily does a syntax check so the cited[1]
reasons for the use of check_function_bodies do not seem to apply here.
(Not sure if this is different on 8.0 or earlier.)

[1] http://www.postgresql.org/docs/8.1/static/runtime-config-client.html
-- 
Regards, James William Pye


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: constraints and sql92 information_schema compliance
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: constraints and sql92 information_schema compliance