plase take a look to the following small sample
CREATE FUNCTION test(TEXT) RETURNS TEXT AS '
DECLARE
cmd TEXT;
BEGIN
RETURN cmd || ''Hello'';
END;
' LANGUAGE 'plpgsql';
When I execute the function
select test('');
test
------
(1 row)
I got an empty string for result. I think I got this result because the
string concatenation ("||") was created with "isstrict" flag. In this case
it will give back NULL object if one of the arguments was NULL object.
In most of the cases I think it is ok, but specially for the string
concatenation is not really convinient.
Is this feature will change in the future? Any "smart" solution for this
problem? - I cannot use the IF..ENDIF statement before each string
concatenation, I have too many in my code.
Best Regards,
Yuri