update db adapter for postgres