select * from foo where (bar2 is not null and (bar2<->point(0,0)) < 1000 ) ; 
select * from foo where (bar2<->point(0,0)) < 1000  ; 
