CREATE OR REPLACE FUNCTION food600.getidchodmaster(
	idchod integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE idchodmaster INTEGER;
BEGIN
SELECT id_chod_master INTO idchodmaster FROM food600.nlimitchody WHERE id_chod=idchod;
RETURN btrim(idchodmaster::character(20));
END
$BODY$;
