What is the best / easiest way to execute a command line function in Perl so that I can get the output as a string?
What I'm actually trying to do is call the Java program from the PL / Perl function in PostgreSQL, and I want the output line, but for now it seems like it just returns 0.
Here is a simple piece of code to explain what I do after:
CREATE OR REPLACE FUNCTION perl_func()
RETURNS character varying AS
$BODY$
return system("java -version");
$BODY$
LANGUAGE plperlu VOLATILE
COST 100;
Larry source
share