Commit 562d5d8a authored by Justin Bronn's avatar Justin Bronn
Browse files

Fixed #12111 -- now use PostgreSQL escape string syntax when quoting WKB to...

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
parent 7b63d3d3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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