CREATE OR REPLACE FUNCTION food600.getidtypslave(
	idtypmaster integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE 
idtyp INTEGER;
BEGIN
SELECT id_typ INTO idtyp FROM food600.nlimittypy WHERE id_typ_master=idtypmaster;
RETURN btrim(idtyp::character(20));
END;
$BODY$;
