Open dnicolodi opened 1 year ago
I think you looked into this deeper than I did and I agree with you!
I was looking for an opinion on weather supporting the feature is worth breaking backward compatibility.
Considering that BQL queries stored in Beancount input files are extremely likely to be using '
as string delimiter because "
is the Beancount string delimiter, I think the backward compatibility problem may not be so severe, but this is still a quite important syntax change.
I forget if I added escapes in the Beancount syntax. That's going to be crucial for this change.
Yes, the parser supports escaping double quotes as \"
. For v3 we could also consider having Python-like triple quotes.
Currently BQL uses single
'
and double"
quotes interchangeably as string delimiters and does not have the concept of quoted identifiers. This make is impossible to have column names that collide with BQL keywords or that contain non-alphanumeric characters. This is sometimes annoying.Standard SQL uses single quotes
'
for string literals and double quotes"
for quoting identifiers. https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERSShould BQL do the same? It would be a tiny patch to the parser. However, I expect this to break a fair number of user queries.
@blais, do you have an opinion?