CREATE OR REPLACE FUNCTION food600.getckartyslave(
	ckartymaster integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE ckarty INTEGER;
BEGIN
SELECT c_karty INTO ckarty FROM food600.karty WHERE c_k_m=ckartymaster;
RETURN btrim(ckarty::character(20));
END
$BODY$;
