Thursday, December 23, 2010

WHERE NOT IN and NULL in Postgresql

NULL values trip up the WHERE NOT IN condition in Postgres. To fix this behavior, use a conditional (not null) in the subquery.