raise ProgrammingError
add Cursor.closed property