CREATE OR REPLACE FUNCTION food600.getidfooddatslave(
	idfooddatmaster character varying)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE 
idfooddat character varying;
BEGIN
SELECT id INTO idfooddat FROM food600.food_dat WHERE idmaster=idfooddatmaster;
RETURN idfooddat;
END;
$BODY$;
