mirror of
https://github.com/django/django.git
synced 2024-12-24 18:16:19 +00:00
Fixed #12111 -- now use PostgreSQL escape string syntax when quoting WKB to prevent spurious warnings in database logs. Thanks, Matt Russell for ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7b63d3d3b4
commit
562d5d8a28
@ -30,7 +30,7 @@ class PostGISAdaptor(object):
|
||||
def getquoted(self):
|
||||
"Returns a properly quoted string for use in PostgreSQL/PostGIS."
|
||||
# Want to use WKB, so wrap with psycopg2 Binary() to quote properly.
|
||||
return "%s(%s, %s)" % (GEOM_FROM_WKB, Binary(self.wkb), self.srid or -1)
|
||||
return "%s(E%s, %s)" % (GEOM_FROM_WKB, Binary(self.wkb), self.srid or -1)
|
||||
|
||||
def prepare_database_save(self, unused):
|
||||
return self
|
||||
|
Loading…
Reference in New Issue
Block a user