Skip to content

Commit 553374b

Browse files
committed
Fixed #14060 -- PostGIS never implemented the ~= operator for geography types, so removed support for it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent f607450 commit 553374b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

django/contrib/gis/db/backends/postgis/operations.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ def get_dist_ops(operator):
233233
})
234234
self.geography_operators = {
235235
'bboverlaps' : PostGISOperator('&&'),
236-
'exact' : PostGISOperator('~='),
237-
'same_as' : PostGISOperator('~='),
238236
}
239237

240238
# Creating a dictionary lookup of all GIS terms for PostGIS.

django/contrib/gis/tests/geogapp/tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ def test04_invalid_operators_functions(self):
4444
# `@` operator not available.
4545
self.assertRaises(ValueError, City.objects.filter(point__contained=z.poly).count)
4646

47+
# Regression test for #14060, `~=` was never really implemented for PostGIS.
48+
htown = City.objects.get(name='Houston')
49+
self.assertRaises(ValueError, City.objects.get, point__exact=htown.point)
50+
4751
def test05_geography_layermapping(self):
4852
"Testing LayerMapping support on models with geography fields."
4953
# There is a similar test in `layermap` that uses the same data set,

0 commit comments

Comments
 (0)