change from swlite3 to postgres