improve sql parser for postgresql