[thuban-Bugs][224] postgis tables on utf8 systems must use psycopg2 ...
thuban-bugs@wald.intevation.org
thuban-bugs at wald.intevation.org
Mon Nov 6 14:33:45 CET 2006
Bugs item #224, was opened at 2006-11-06 14:33
You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=105&aid=224&group_id=6
Or by replying to this e-mail entering your response between the following markers:
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+
(enter your response here)
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+
Status: Open
Priority: 3
Submitted By: Didrik Pinte (dpinte)
Assigned to: Nobody (None)
Summary: postgis tables on utf8 systems must use psycopg2 ...
Resolution: None
Version: None
Category: None
Initial Comment:
The psycopg 1 module does not support utf-8 locales. In order to correct the problem, I've written a little path to support psycopg2.
The technical migration from psycopg1 to psycopg2 is described here : http://initd.org/tracker/psycopg/wiki/Migration
The only things to patch are in the Thuban/Model/postgisdb.py file :
[1] the import must manage the version 1 and version 2
[2] %d formatting is not supported anymore with psycopg2
[3] psycopg.INTEGER is not defined anymore by psycopg.NUMBER exists in the two version.
[4] There seem to be a little problem with line 538 of the file:
cursor.execute("SELECT srid, type FROM geometry_columns"
" WHERE f_table_name = %s AND f_geometry_column=%s",
(self.tablename, self.geometry_column))
With psycopg 1, this line produces the following non authorized sql statement :
SELECT srid, type FROM geometry_columns WHERE f_table_name = 'europe' AND f_geometry_column=the_geom
With psycopg 2,it works fine ...
Can someone with a working psycopg1 environment test the patch ?
----------------------------------------------------------------------
You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=105&aid=224&group_id=6
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)