I have the following sql:
SELECT concat_ws(', ', address1, address2, address3) as address
FROM mydb."addresses"
But I get the following error:
function concat_ws(unknown, character varying, character varying, character varying) does not exist
I am using PostgreSQL 9.0
concat_wsis available from version 9.1.I strongly recommend to update your database.
demo: db<>fiddle
Version for 9.0:
unnest()this array. This expands the element into each rowNULLvalues (that's whatconcat_ws()does)