Thermal spraying of ceramics