Open
Description
Currently the message when there is a syntax error does not include the position within the query. This makes larger queries quite difficult to debug. It looks like the Line and Where attributes of pq.Error don't return anything useful in these cases.
@johto tracked down the code that handles this in libpq to http://doxygen.postgresql.org/fe-protocol3_8c.html#a547f08283e1202c05d3039579dc38616