CREATE OR REPLACE FUNCTION food600.getidskupslave(
	idskupmaster integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE 
idskup INTEGER;
BEGIN
SELECT id_skup INTO idskup FROM food600.spravyskupiny WHERE id_skup_master=idskupmaster;
RETURN btrim(idskup::character(20));
END;
$BODY$;
