def find_attachments(pattern, cursor):
    """Return a list of attachments that match the specified pattern.

    Args:
        pattern: The path to the attachment, as a SQLite pattern (to be
            passed to a LIKE clause).
        cursor: The Cursor object through which the SQLite queries are
            sent to the Zotero database.

    Returns:
        A list of (parentItemID, path) pairs that match the specified
        pattern. The returned list is empty if no matches are found.
    """
    query = 'SELECT parentItemID, path FROM itemAttachments WHERE path LIKE ?'
    cursor.execute(query, (pattern,))
    return list(cursor)