fix User#recent_threads for postgresql