I get errors that look like this from node-postgres
(when calling its client.query
method):
{ [Error: syntax error at or near "as"]
severity: 'ERROR',
code: '42601',
position: '60',
file: 'scan.l',
line: '1044',
routine: 'scanner_yyerror' } }
If I could see the offending SQL alongside the error message, it would make debugging a lot easier. Is it possible to get it somehow?
I realise that I can implement this manually (wrap client.query
etc.), but what I'm interested in is whether node-postgres
itself can be coerced into providing the SQL.