Any ideas what is wrong with this code, Error at or near Insert on a new function CREATE FUNCTION insert_m_a_k("odOrganizacijaId" uuid, "doOrganizacijaId" uuid) RETURNS boolean AS
$BODY$BEGIN 
    INSERT INTO mapper_a_k (id, model_a_k_id, organizacija_id, k_a_k, k_a_k_ime, aktiven, deleted)
    SELECT  uuid_generate_v4(), model_a_k_id, doOrganizacijaId , k_a_k, k_a_k_ime, aktiven, deleted 
    FROM mapper_a_k WHERE organizacija_id = odOrganizacijaId AND deleted = false;
END;$BODY$
LANGUAGE sql VOLATILE NOT LEAKPROOF;
PostgreSQL has several languages for functions, and it is easy to get confused.

PL/pgSQL uses BEGIN / END blocks.

But LANGUAGE sql functions consist only of SQL statements with no blocks ir other procedural elements.

So either change the language to plpgsql and add a semicolon or (better) remove the BEGIN / END block.