add support for postgres to v3.1.7