make it possible to not use json with Postgres