1
如何检查两个多边形是否在PG 8.3中相交?如何检查Postgres中的两个多边形是否相交?
#
和#?
没有为多边形工作:
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
而且&&
给出错误asnwer:
select polygon'((0,0), (1,2), (0,2))' && polygon'((0.5, 0), (1,0), (1,1))';
?column?
----------
t
(1 row)
哇! 9.0版给出了正确的答案,错误,但8.4(和你的8.3)给出了错误的答案。对我来说看起来像一个bug。你最好在http://www.postgresql.org/support/submitbug – 2011-02-16 10:47:03