From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Tiziano Tissino" <t(dot)tissino(at)itaca(dot)coopsoc(dot)it> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #2532: os.chdir call in plpython function doesn't work |
Date: | 2006-07-16 05:09:46 |
Message-ID: | 27357.1153026586@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"Tiziano Tissino" <t(dot)tissino(at)itaca(dot)coopsoc(dot)it> writes:
> I have a function like the following one:
> CREATE OR REPLACE FUNCTION public.test() RETURNS int4 AS $BODY$
> from os import chdir
> chdir('/tmp')
> test=plpy.execute('SELECT int_field FROM table1;')[0]['int_field']
> return test
> $BODY$ LANGUAGE 'plpythonu' VOLATILE;
chdir is a great way to break your database. Don't do it.
Other things to avoid in plpythonu functions include: rm -rf,
kill -9 the postmaster, etc ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Konstantin Pavlovsky | 2006-07-16 11:03:32 | postgresql bug on macosx |
Previous Message | Tiziano Tissino | 2006-07-15 18:39:43 | BUG #2532: os.chdir call in plpython function doesn't work |