Ticket #2907 (closed defect: fixed)
unicode merge broke PostgreSQL support
| Reported by: | sfrost@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10 |
| Component: | general | Version: | devel |
| Severity: | normal | Keywords: | postgresql psycopg1 unicode |
| Cc: | pacopablo@…, shishz@… |
Description
Changeset 3024 ('Merged sandbox/unicode in trunk.') broke PostgreSQL support by dropping the proper quoting when doing lookups into the database. I noticed this at least in trac/attachment.py, line 171, which gave me this error: ERROR: column "wikistart" does not exist SELECT filename,description,size,time,author,ipnr FROM attachment WHERE type='wiki' AND id=WikiStart ORDER BY time
Changing line 171 in attachment.py to again include the 'str()' fixed the problem, ie: 169: cursor.execute("SELECT filename,description,size,time,author,ipnr " 170: "FROM attachment WHERE type=%s AND id=%s ORDER BY time", 171: (parent_type, str(unicode(parent_id))))
Note sure what other or how many other places something similar is needed...
Thanks!
Stephen


