I am trying to understand how to set an output value in a user created functions in postgres. So I made this simple function:
CREATE OR REPLACE FUNCTION test()
RETURNS BOOLEAN AS $return_value$
DECLARE return_value BOOLEAN;
BEGIN
SET return_value = TRUE
RETURN return_value;
END;
$return_value$ LANGUAGE plpgsql;
I would like to understand why this spawns the error
ERROR: unrecognized configuration parameter "return_value"