CREATE OR REPLACE FUNCTION food600.getidlimitslave(
	idlimitmaster integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE 
idlimit INTEGER;
BEGIN
SELECT id_limit INTO idlimit FROM food600.nlimit_hl WHERE id_limit_master=idlimitmaster;
RETURN btrim(idlimit::character(20));
END;
$BODY$;
