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