...on second thought, the placement of the IS NULL predicate isn't quite right, but if you futz with it a bit I think you can make it work ----- Jim Finnerty, AWS, Amazon Aurora PostgreSQL -- Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html