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