pganalyze / pg_query_go

Go library to parse and normalize SQL queries using the PostgreSQL query parser
BSD 3-Clause "New" or "Revised" License
663 stars 79 forks source link

Special characters by parsing "select * from x where y != 0" #41

Closed arcanique closed 3 years ago

arcanique commented 3 years ago

use Parse method: ` import pq "github.com/pganalyze/pg_query_go/v2"

func main() { sql := "select * from x where y != 0" result, err := pq.Parse(sql) fmt.Printf("%+v, %+v\n",result,err) } ` In the result, the inequality sign ‘!=’ becomes to '<>'

Has anyone encountered this problem