我有一个这样的查询:
SELECT boroughs.name
FROM boroughs, uniroads
WHERE uniroads.normalizedName='6 AVENUE'
AND st_intersects(boroughs.geometry, uniroads.way)
AND boroughs.name='Brooklyn'
0 results
但是当我运行它时,它没有返回任何结果。但是,我能够在表中找到我希望它返回的特定行,并且当我添加一个要求该特定行的子句时,它可以正常工作:
SELECT boroughs.name
FROM boroughs, uniroads
WHERE uniroads.normalizedName='6 AVENUE'
AND st_intersects(boroughs.geometry, uniroads.way)
AND boroughs.name='Brooklyn'
AND uniroads.osm_id='23334071'
1 result
我通过 Postgres.app 将 Postgres 9.2.2.0 与 PostGIS 一起使用。