penberg / limbo

Limbo is a work-in-progress, in-process OLTP database management system, compatible with SQLite.
MIT License
960 stars 53 forks source link

Double-quoted String Literals in function #196

Open JeanArhancet opened 1 month ago

JeanArhancet commented 1 month ago

Currently, double-quoted strings are misinterpreted as column identifiers in functions. For instance, the query select upper("abc"); results in a Parse error: column with name "abc" not found. This needs correction to properly recognize double-quoted strings within functions.

jussisaurio commented 1 month ago

Isn't this as expected in SQL?

jussisaurio commented 1 month ago
SQLite version 3.46.0 2024-05-23 13:25:27
Enter ".help" for usage hints.
sqlite> select 'limbo';
limbo
sqlite> select "limbo";
Parse error: no such column: "limbo" - should this be a string literal in single-quotes?
sqlite> select length("limbo");
Parse error: no such column: "limbo" - should this be a string literal in single-quotes?
JeanArhancet commented 1 month ago

@jussisaurio According to the SQLite documentation, support for double quotes is configurable. Is it possible that this feature is disabled in your version?

On my laptop (Mac - SQLite version 3.43.2), the SQL command behavior is:

image