Closed aleclarson closed 2 months ago
Is this when you're generating the plan?
Yes it is. In this case, the error message is syntax-related:
Error: generating plan: getting new schema: running DDL: ERROR: syntax error at or near "%" (SQLSTATE 42601)
That makes sense! I'll try to put up something tomorrow for this. Unfortunately, it probably won't include line number because that would require us to parse the entire SQL AST. When reading in SQL from a file, it's read-in and executed as one large SQL statement and Postgres handles splitting it into individual statements.
Naively splitting on ";" will not work because you can imagine ";" could be present in escaped identifiers, strings, comments.
Currently, there's no hint as to which statement is failing, at least as far as filename and line number. It'd be awesome to have those!