如何检查两个多边形是否在PG 8.3中相交?
#
和#?
不适用于多边形:
select polygon'((0,0), (1,2), (0,2))' # polygon'((0.5, 0), (1,0), (1,1))';
ERROR: operator does not exist: polygon # polygon
select polygon'((0,0), (1,2), (0,2))' #? polygon'((0.5, 0), (1,0), (1,1))';
ERROR: operator does not exist: polygon #? polygon
并且&&
错误地说明了:
select polygon'((0,0), (1,2), (0,2))' && polygon'((0.5, 0), (1,0), (1,1))';
?column?
----------
t
(1 row)