Trac Attachments

Daniel Atallah daniel.atallah at
Mon Jun 2 22:51:02 EDT 2008

2008/6/2 Richard Laager <rlaager at>:
> Is there a way to find all the tickets with attachments? I'd like to
> make a pass to find patches on tickets that are not flagged as patches.

The easiest way I can see to do this is with a query against the
postgres DB running trac:

SELECT, a.filename, a.size
FROM trac_pidgin.ticket t, trac_pidgin.attachment a
WHERE t.type <> 'patch'
AND a.type = 'ticket'
AND t.status <> 'closed'


More information about the Devel mailing list