Opened 12 years ago
Closed 12 years ago
#2035 closed defect (fixed)
Strange behavior when using left (<<) and right (>>) operators.
Reported by: | jbronn | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.2 |
Component: | postgis | Version: | 2.0.x |
Keywords: | left right operator | Cc: | claudep |
Description
During the process of adding PostGIS support for GeoDjango, I came across a regression in my test suite when using the left and right operators.
Specifically, when querying a spatial table (or using COUNT(*)
) using the left (<<
) or right (>>
) operators, no results are returned. However, when a LIMIT
is added to the query it works.
Attached to this ticket is SQL that demonstrates this issue; I've confirmed on Ubuntu 12.04 (Postgres 9.1.5, GEOS 3.2.2, PostGIS 2.0.1) and on my Mac (Postgres 9.2.1, GEOS 3.3.5, PostGIS 2.0.1).
Attachments (1)
Change History (5)
by , 12 years ago
Attachment: | postgis2_error.sql added |
---|
comment:1 by , 12 years ago
Cc: | added |
---|
comment:2 by , 12 years ago
No particular surprise, the difference is that the LIMIT forces the query plan into a sequence scan rather than an index scan, so the difference is due to different behaviour between those modes. So, new mystery: why the difference?
comment:3 by , 12 years ago
And the answer is that the gist_consistent function in 2.0 just doesn't implement those strategies. Hum hum.
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
SQL file demonstrating operator regression.