CREATE FUNCTION foo() RETURNS text
LANGUAGE plperl
AS $$
return 'foo';
$$;
CREATE FUNCTION foobar() RETURNS text
LANGUAGE plperl
AS $$
return foo() . 'bar';
$$;
I'm trying to compose results using multiple functions, but when I call foobar()
I get an empty result.
From the documentation:
The solution appears to be either calling the function as a postgres function (using spi_query) or you can put references to your functions in the globally available hash
%_SHARED
as shown here