もうこうなりゃPostgresの幾何データもやってやれ

create table t_test( the_polygon POLYGON );
insert into t_test select '( (0,0), (100,0), (100,100), (0,100), (0,0), (10,10), (20,20), (20,10), (10,10) )';
select the_polygon @> '(30,30)'::point from t_test;
 ?column? 
                  • -
t (1 row) select the_polygon @> '(15,12)'::point from t_test; ?column?
                  • -
f (1 row)

見ての通り、幾何データのPOLYGONには、リングはありません。代わりに強引に二重にしてやると、穴あきは可能でした。