I have a polygon column for which I would like to add a unique constraint that tests for spatial equality akin to `ST_Equals` so that it ignores vertex order. For instance, I would like these polygons to count as duplicates:

```
ST_GeomFromText('POLYGONZ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1))')
ST_GeomFromText('POLYGONZ((1 0 1, 1 1 1, 0 1 1, 0 0 1, 1 0 1))')

```

Is there a standard way to implement this other than a GIST index, which the docs say only indexes the bounding box?

One solution I'm thinking of is to index on a function that returns a sorted array of polygon vertices, but it seems like a hack.