CREATE OR REPLACE FUNCTION food600.getidstravslave(
	idstravmaster integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE
AS $BODY$
DECLARE 
idstrav INTEGER;
BEGIN
SELECT id_strav INTO idstrav FROM food600.nlimitstravnici WHERE id_strav_master=idstravmaster;
RETURN btrim(idstrav::character(20));
END;
$BODY$;
