"Tiziano Tissino" <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings