minor postgres fixes