Description
Variable inside declaration block are not initialized:
CREATE FUNCTION test1() RETURNS STRING AS ret string DEFAULT 'Initial value'; BEGIN print(ret); ret := 'VALUE IS SET'; print(ret); END; test1();
Output:
ret VALUE IS SET
Should be:
Initial value VALUE IS SET