Modify ↓
#3730 closed defect (duplicate)
Queries are not type safe for PostgreSQL 8.3
| Reported by: | Kamil Kisiel | Owned by: | Noah Kantrowitz |
|---|---|---|---|
| Priority: | normal | Component: | MasterTicketsPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
The MasterTicketsPlugin uses queries which don't work with PostgreSQL 8.3 due to type checking.
For example, the query on line 21 of model.py:
cursor.execute('SELECT dest FROM mastertickets WHERE source=%s ORDER BY dest', (self.tkt.id,))
returns the following error:
ERROR: operator does not exist: text = integer
LINE 1: select dest from mastertickets where source=1 order by dest;
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
This can be corrected by adding quotes, for example:
cursor.execute('SELECT dest FROM mastertickets WHERE source='%s' ORDER BY dest', (self.tkt.id,))
Attachments (0)
Note: See
TracTickets for help on using
tickets.



There is another ticket on this. Too lazy to find it.