CREATE OR REPLACE FUNCTION food600.getcdruhmaster(
	cdruh integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE 
cdruhmaster INTEGER;
BEGIN
SELECT c_d_m INTO cdruhmaster FROM food600.skupiny WHERE c_druh=cdruh;
RETURN btrim(cdruhmaster::character(20));
END;
$BODY$;
