"Mason Hale" <masonhale@xxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general