fixed syntax for postgresql