use pg or sqlite according to the environment