CREATE OR REPLACE FUNCTION food600.getcpartnermaster(
	cpartner integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE cpartnermaster INTEGER;
BEGIN
SELECT c_partner_master INTO cpartnermaster FROM food600.partneri WHERE c_partner=cpartner;
RETURN btrim(cpartnermaster::character(20));
END
$BODY$;
