CREATE OR REPLACE FUNCTION food600.getidrovmaster(
	idrov integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE idrovmaster INTEGER;
BEGIN
SELECT id_rov_master INTO idrovmaster FROM food600.nlimitrov WHERE id_rov=idrov;
RETURN btrim(idrovmaster::character(20));
END
$BODY$;
