I am wondering if there is a better way to write a test function in Postgresql 8. The following sniped code works fine under AWS Redshift in my tests so maybe someone can share a shorter implementation in the aforementioned AWS service.
-- The simplest function that I wrote in Postgresql
CREATE FUNCTION TEST_FUNCTION()
RETURNS INTEGER
STABLE
AS $$
return 1
$$ LANGUAGE plpythonu;
-- Testing the simplest function
SELECT TEST_FUNCTION();
-- Dropping the simplest function out
DROP FUNCTION TEST_FUNCTION();