Browse files

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: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 7b63d3d commit 562d5d8a28b16ab069d716b81085f5dce8934d9b @jbronn jbronn committed Nov 8, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/gis/db/backend/postgis/
@@ -30,7 +30,7 @@ def __str__(self):
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

0 comments on commit 562d5d8

Please sign in to comment.