Within kettle; there is way to execute nonstandard code SQL?
Something like this for example:

CREATE OR REPLACE FUNCTION test() RETURNS int AS $$
DECLARE
cont INTEGER:=0;
BEGIN
RETURN cont;
END;
$$ LANGUAGE PLPGSQL;
SELECT test();

Of local form I have solved it commanding to call “.sh”; but now I must execute consultations of this type in a remote server and I cannot use plus ”.sh ".
Some suggestion?
Thanks beforehand for the aid.