Author: jbronn
Date: 2009-11-07 18:51:42 -0600 (Sat, 07 Nov 2009)
New Revision: 11726
Modified:
django/trunk/django/contrib/gis/db/backend/postgis/adaptor.py
Log:
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.
Modified: django/trunk/django/contrib/gis/db/backend/postgis/adaptor.py
===================================================================
--- django/trunk/django/contrib/gis/db/backend/postgis/adaptor.py 2009-11-07 17:09:09 UTC (rev 11725)
+++ django/trunk/django/contrib/gis/db/backend/postgis/adaptor.py 2009-11-08 00:51:42 UTC (rev 11726)
@@ -30,7 +30,7 @@
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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to
django-updates@...
To unsubscribe from this group, send email to
django-updates+unsubscribe@...
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en-~----------~----~----~----~------~----~------~--~---