Weirdly, it didn't work if I did this
strn text = chr(10);
str = ''something'' || strn;
but it did work if I did this,
str = ''something'' || chr(10);
So thanks alot!
Hi I'm trying to concatenate to strings together with a newline.
CREATE OR REPLACE FUNCTION concat() RETURNS TEXT AS '
DECLARE
str text;
strn text = E'\n' <- This breaks.
BEGIN
str = ''number of completed'' || strn;
str = str || str;
RETURN str;
END
' Language plpgsql;
Thanks...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.