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?
To use variables you need a
plpgsqlfunction: