From: | Alexandre da Silva <simpsomboy(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | plpythonu |
Date: | 2008-01-17 20:43:51 |
Message-ID: | 1200602631.6647.14.camel@alexandrelaptop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
someone can tell me if is secure to create external python modules and
import them to functions/procedures/triggers to use?
I am doing the following:
function/procedure/trigger:
CREATE OR REPLACE FUNCTION tabela_be_i_tg_fx() RETURNS trigger AS $body$
from dbfunctions.postgres.pg_trigger import TestTrigger as fx
fe = fx()
return fe.execute(args=TD["args"], event=TD["event"], when=TD["when"],
level=TD["level"], name=TD["name"], relid=TD["relid"], new=TD["new"],
old=TD["old"], pl_py=plpy)
$body$
LANGUAGE plpythonu;
at python module I have:
class TestTrigger(object):
def execute(self, args, event, when, level, name, relid, new, old,
pl_py):
new["group_name"]='__modified__'
return 'MODIFY'
all this works properly (on windows and linux), but I don't know if is
the correct way to use plpythonu, and if I will have future problems.
Another question is that I have read in some discussion list (old
message year 2003) the possibility of plpython be removed from
postgresql, this information is valid yet?
sorry bad English
Thank's for all
--
Alexandre da Silva
Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007)
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Turner | 2008-01-17 20:52:37 | Re: advocacy: drupal and PostgreSQL |
Previous Message | Scott Marlowe | 2008-01-17 20:42:15 | Re: advocacy: drupal and PostgreSQL |