fix pg, sqlite