Tweaks for postgres driver (not tested yet).