Opened 13 years ago

Last modified 11 years ago

#8391 closed defect

SQL error when using PostgreSQL viewing /hours where no tickets exist — at Version 4

Reported by: Adam Piper Owned by: Ryan J Ollos
Priority: high Component: TracHoursPlugin
Severity: normal Keywords: postgresql postgres sql syntax error
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

While this works fine on SQLite, the WHERE ticket IN () is invalid for PostgreSQL. As such I have tweaked the code to merely return an empty list in this circumstance. See attached patch.

Change History (5)

Changed 13 years ago by Adam Piper

Attachment: hours_postgres.diff added

patch for early return where no ticket ID is provided

comment:1 Changed 13 years ago by Ryan J Ollos

Priority: normalhigh
Status: newassigned

comment:2 Changed 13 years ago by Ryan J Ollos

#8390 closed as a duplicate.

comment:3 Changed 13 years ago by Ryan J Ollos

See also #8343 for a similar issue when running under MySQL.

comment:4 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

I'm not setup to test on PostgreSQL yet, but I'll commit the fix and please report back if it is working well for you.

Note: See TracTickets for help on using tickets.