resolve the problem on postgresql