Public bug reported: The PostGIS database backend does not properly escape geography data when "standard_conforming_strings = off" is set in the PostgreSQL configuration. This is the default setting in PostgreSQL 9.1. As a result, trying to insert GIS database fails with the exception:
DatabaseError: invalid byte sequence for encoding "UTF8": 0x00 This is upstream issue 16778. Django 1.4 contains a fix for this issue, however the developers have stated that they do not intend to backport it to Django 1.3.x. See: https://code.djangoproject.com/ticket/16778 The patch from the above ticket applies cleanly; I've attached it to this ticket for convenience. After applying both the attached patch and the patch from LP: #1004180 I am able to successfully insert GIS data on Ubuntu 12.04LTS. ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: python-django 1.3.1-4ubuntu1 ProcVersionSignature: Ubuntu 3.2.0-24.38-virtual 3.2.16 Uname: Linux 3.2.0-24-virtual x86_64 ApportVersion: 2.0.1-0ubuntu7 Architecture: amd64 Date: Thu May 24 21:42:31 2012 PackageArchitecture: all ProcEnviron: TERM=xterm-256color LANG=en_US.UTF-8 SHELL=/bin/bash SourcePackage: python-django UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: python-django (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug precise -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1004204 Title: PostGIS does not properly escape data with PostgreSQL 9.1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-django/+bug/1004204/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
