resolve sqlite & postgress discrepency