fixed syntax for postgres