I created a function using postgresql. But this function returns error when i try to execute it.
error "ERROR: syntax error at or near "||"
CREATE OR REPLACE FUNCTION search_address_book(address_ids character)
RETURNS void AS
$BODY$
SET sqlStatement = 'select * from addressbook';
SET address_ids = 'Post' || 'greSQL';
$BODY$
LANGUAGE 'sql' STABLE
COST 100;
My Server version is 8.3.14. Is this wrong? how do i concat two strings in postgresql?
'sql'or'plpgsql'is unsupported and will not work any longer when moving to 9.1 or higher. You should specify the language without single quotes.For backward compatibility, the name can be enclosed by single quotes.