PostGIS does not properly escape data with PostgreSQL 9.1

Bug #1004204 reported by Dave Pifke
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-django (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

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)

Revision history for this message
Dave Pifke (dave-thingomatic) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch to PostGIS database backend from upstream issue 16778" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-django (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim Graham (timograham) wrote :

Seems to me like we should close this issue as it doesn't seem like the patch will be applied before Ubuntu 12.04 is end-of-life. What's the correct status to mark an issue as "won't fix"?

Revision history for this message
Nish Aravamudan (nacc) wrote :

There is a "Won't Fix" Status.

Changed in python-django (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.