Bug reference: 14583 Logged by: Paulo B Email address: paulo.nuno.leite@gmail.com PostgreSQL version: 9.5.6 Operating system: Windows Description:
I have the following function that runs a command:
CREATE OR REPLACE FUNCTION public.classify_test() RETURNS void AS $BODY$ import os from subprocess import Popen, PIPE import subprocess import os from subprocess import Popen, PIPE
$BODY$ LANGUAGE plpythonu VOLATILE COST 100; ALTER FUNCTION public.classify_test() OWNER TO postgres;
if I run this fuction as select classify_test() it will not run the python script. However, if I run it in the command line it will work. It works as well in SublimeText2 IDE. I have been trying to find what the bug or problem is, but had no success. I am using python2.7, I have psycopg2 installed.