sql parser improved for postgresql