"Mason Hale" <masonhale(at)gmail(dot)com> writes:
> I'm getting some unexpected results with a NOT IN query -- this is on 8.2.5.
If there are any NULLs in subscription.last_feed_download_task_id, that
NOT IN will not behave the way you are expecting. You might want to
filter the nulls out of the subselect result ...
regards, tom lane