When I execute a SQL command via libpq
, it reports error message if there's some error something like this.
Error Domain=PQConnection Code=1 "ERROR: syntax error at or near "fef"
LINE 1: fef
^
This is string message. I can parse the message - because it's very regular - to get line/column number, but that's unreliable. Is there any other API to get line/column numbers? Any regularized integer form would be nice.