Context. The determination of interstellar abundances is essential for a better understanding of stellar nucleosynthesis and the "chemical" evolution of the Galaxy. Aims. The aim is to determine O-18/O-17 abundance ratios across the entire Galaxy. These provide a measure of the amount of enrichment by high-mass versus intermediate-mass stars. Methods. Such ratios, derived from the (CO)-O-18 and (CO)-O-17 J = 1-0 lines alone, may be affected by systematic errors. Therefore, the (CO)-O-18 and (CO)-O-17 (1-0), (2-1), and (3-2), as well as the (CO)-C-13(1-0) and (2-1) lines, were observed towards 18 prominent galactic targets (a total of 25 positions). The combined dataset was analysed with a large velocity gradient model, accounting for optical depth effects. Results. The data cover galactocentric radii between 0.1 and 16.9 kpc (solar circle at 8.5 kpc). Near the centre of the Galaxy, O-18/O-17= 2.88 +/- 0.11. For the galactic disc out to a galactocentric distance of similar to 10 kpc, O-18/O-17= 4.16 +/- 0.09. At similar to 16.5 kpc from the galactic centre, O-18/O-17= 5.03 +/- 0.46. Assuming that O-18 is synthesised predominantly in high-mass stars (M > 8 M-circle dot), while (CO)-O-17 is mainly a product of lower mass stars, the ratio from the inner Galaxy indicates a dominance of CNO-hydrogen burning products that is also apparent in the carbon and nitrogen isotope ratios. The high O-18/O-17 value of the solar system (5.5) relative to that of the ambient interstellar medium suggests contamination by nearby high-mass stars during its formation. The outer Galaxy poses a fundamental problem. High values in the metal-poor environment of the outer Galaxy are not matched by the low values observed towards the even more metal-poor Large Magellanic Cloud. Apparently, the outer Galaxy cannot be considered as an intermediate environment between the solar neighbourhood and the interstellar medium of small metal-poor galaxies. The apparent O-18/O-17 gradient along the galactic disc and the discrepancy between outer disc and LMC isotope ratios may be explained by different ages of the respective stellar populations. More data from the central and far outer parts of the Galaxy are, however, needed to improve the statistical significance of our results.