CREATE OR REPLACE FUNCTION food600.getidkartyslave(
	idkartymaster integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'

    COST 100
    VOLATILE 
    
AS $BODY$
DECLARE 
idkarty INTEGER;
BEGIN
SELECT id_karty INTO idkarty FROM kredit.hk_oskar WHERE id_karty_master=idkartymaster;
RETURN btrim(idkarty::character(20));
END;
$BODY$;
