Re: Pl/Python -- current maintainer?

From: James William Pye <pgsql(at)jwp(dot)name>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tino Wildenhain <tino(at)wildenhain(dot)de>, James Robinson <jlrobins(at)socialserve(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Hackers Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Pl/Python -- current maintainer?
Date: 2006-02-26 21:45:27
Message-ID: 20060226214527.GC53835@lit.jwp.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2006-02-26 22:09:07 Re: constraints and sql92 information_schema compliance
Previous Message Andrew Dunstan 2006-02-26 21:41:08 Re: constraints and sql92 information_schema compliance