sqlite and postgres works and fix test for postgres