fixed a bug in test cases for postgresql