more postgres fixes