I had some help on here and got the following code:
-- Setup Solrid Function
CREATE OR REPLACE FUNCTION solrid(IN local_id INTEGER, OUT result TEXT) AS $$
DECLARE
database_id TEXT := 'A';
BEGIN
result := database_id || local_id::TEXT;
END;
$$ LANGUAGE PLPGSQL;
However when I run it in sqlfiddle it says:
Schema Creation Failed: ERROR: unterminated dollar-quoted string at or near "$$ DECLARE database_id TEXT := 'A'":
This error may seem pretty self explanatory but I can't figure out the way to fix it. Would anyone mind shedding some light on this please?