Ticket #8391 (closed defect: fixed)

Opened 2 years ago

Last modified 7 months ago

SQL error when using PostgreSQL viewing /hours where no tickets exist

Reported by: piperad Assigned to: rjollos
Priority: high Component: TracHoursPlugin
Severity: normal Keywords: postgresql postgres sql syntax error
Cc: Trac Release: 0.11

Description (Last modified by rjollos)

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.

Attachments

hours_postgres.diff (0.6 kB) - added by piperad on 01/11/11 13:19:46.
patch for early return where no ticket ID is provided

Change History

01/11/11 13:19:46 changed by piperad

  • attachment hours_postgres.diff added.

patch for early return where no ticket ID is provided

01/11/11 19:31:31 changed by rjollos

  • priority changed from normal to high.
  • status changed from new to assigned.

01/11/11 19:33:09 changed by rjollos

#8390 closed as a duplicate.

01/11/11 19:35:26 changed by rjollos

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

10/19/12 00:35:46 changed by rjollos

  • description changed.

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.

10/19/12 00:45:00 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [12204]) Fixes #8391: Fixed a SQL incompatibility issue on PostgreSQL. Thanks to piperad for the report and initial patch.


Add/Change #8391 (SQL error when using PostgreSQL viewing /hours where no tickets exist)




Change Properties
Action