some small changes for postgresql