1. Watch the parentheses. It’s:
ST_GeomFromText('POLYGON((outerRing), (innerRing), (innerRing), ...)')
The inner rings are optional. If you have just the outer ring, then it’s still:
ST_GeomFromText('POLYGON((outerRing))')
and not:
ST_GeomFromText('POLYGON(outerRing)')
2. Polygons have to start and end at the same point.
3. Watch the commas. Rings are comma-delimited sets of of whitespace-delimited coordinate pairs:
x1 y1, x2 y2, x3 y3, x4 y4
not:
x1 y1 x2 y2 x3 y3
x1, y1, x2, y2, x3, y3, x4, y4
(x1, y1), (x2, y2), (x3, y3)
or other variations on that theme.