Kaydet (Commit) 553374b5 authored tarafından Justin Bronn's avatar Justin Bronn

Fixed #14060 -- PostGIS never implemented the `~=` operator for geography types,…

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
üst f6074506
......@@ -233,8 +233,6 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations):
})
self.geography_operators = {
'bboverlaps' : PostGISOperator('&&'),
'exact' : PostGISOperator('~='),
'same_as' : PostGISOperator('~='),
}
# Creating a dictionary lookup of all GIS terms for PostGIS.
......
......@@ -44,6 +44,10 @@ class GeographyTest(TestCase):
# `@` operator not available.
self.assertRaises(ValueError, City.objects.filter(point__contained=z.poly).count)
# Regression test for #14060, `~=` was never really implemented for PostGIS.
htown = City.objects.get(name='Houston')
self.assertRaises(ValueError, City.objects.get, point__exact=htown.point)
def test05_geography_layermapping(self):
"Testing LayerMapping support on models with geography fields."
# There is a similar test in `layermap` that uses the same data set,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment