Update db adapter for postgresql