Polyesters containing atoms other than carbon, hydrogen and oxygen