inconsitent =0 with boolean type in postgres