CREATE OR REPLACE FUNCTION food600.getidkartymaster(
	idkarty integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'

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