lib / pq

Pure Go Postgres driver for database/sql
https://pkg.go.dev/github.com/lib/pq
MIT License
8.89k stars 906 forks source link

Show position in syntax errors #1017

Closed CorentinDeBoisset closed 1 year ago

CorentinDeBoisset commented 3 years ago

We now format them like psql, e.g.:

pq: syntax error at or near "FROM"
LINE 1: SELECT * FROM FROM items;
                      ^

Closes #194

CorentinDeBoisset commented 3 years ago

This merge request is an updated version of !521 which has been inactive for several years.

vegarsti commented 3 years ago

This would be super nice to have! Great job implementing it.