Paint is typically not to be relied upon for protection against shock, since it can be easily scratched or flake off.
There are huge books and safety standards about this subject, but here's a brief summary.
Clearance is the physical distance, between two conductors.
Creepage is the tracking distance, along a surface, such as a PCB.
The minimum distance on a PCB depends on the: insulation class, voltage, material group and pollution degree. For most indoor environments, at sea level, assume a pollution degree
2.
There are four insulation classes:
Functional: just enough to ensure the device works, not required to be relied upon for protection against shock.
Basic: insulation between a live part, i.e. the mains and an earthed conductor.
Reinforced: insulation between a live part and the user, i.e. an unearthed conductive surface which which user could touch.
Material group is how vulnerable the material is to an arc tracking across its surface. If you don't know what material group your PCB material falls into, just assume IIIa or IIIb which is the worst case.
Pollution degree is a measure of how clean and dry the environment is, just assume 2 if it's to be used indoors in a house or office.
All parts which the user could come into contact with, which aren't connected to earth shall have two layers for basic insulation (classed as double insulation) or a single layer of reinforced insulation.
As a general rule, non-hazardous power supplies, i.e. too lower voltage to shock, are treated as exposed conductors, since they typically lack enough insulation to protect against shock. Allow sufficient creepage distances for reinforced insulation.
In short, if your device run off 230V mains, is being used in a dry environment, where there's the usual amount of dust and dirt, you'd expect a typical indoor environment, then allow a distance of at least 5mm between the mains and low voltage DC sides of the circuit. If it's used outdoors, then the distances will need to increase and it should be in a suitable enclosure to protect against moisture.
Here's more information:
http://www.reo.co.uk/files/safety_7_-_low_voltage_directive.pdfhttps://resources.altium.com/pcb-design-blog/high-voltage-pcb-design-creepage-and-clearance-distancehttps://pcbdesign.smps.us/creepage.htmlhttp://blog.optimumdesign.com/clearance-and-creepage-rules-for-pcb-assemblyhttps://www.silabs.com/documents/public/application-notes/AN583.pdf