In a polygon object like
POLYGON((35 10,10 20,15 40,45 45,35 10),(20 30,35 35,30 20,20 30))
(35 10,10 20,15 40,45 45,35 10) refers to the outer ring while (20 30,35 35,30 20,20 30) refers to the inner ring.
A polygon has exactly one outer ring and zero or more inner rings.
When visualizing the polygon, area under the outer ring, but not under any inner rings should be colored.
So the hack I have used is, I have drawn the outer ring and on top of that drawn the inner rings with the background color. You can find a polygon which has inner rings in the dataset I have uploaded to the demo. (database: opengis, table:gis_all)