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