sqltools-duckdb-driver icon indicating copy to clipboard operation
sqltools-duckdb-driver copied to clipboard

Improper handling of non-standard characters

Open okarika opened this issue 8 months ago • 0 comments
trafficstars

I have several @ and | characters in table and column names (yes I need these). Unfortunately the driver doesn't handling them properly.

  • Show table records: 'Parser Error: syntax error at or near "@"'

  • Describe table: works fine

  • Generate insert query: Two problems

    • there's an additional space before (and sometimes after) the special characters like 'test@a' -> 'test @a' and test|b' -> 'test | b' in case of table and column names
    • the other problem is that it doesn't generate double quote chars around column and table names including special characters
  • Add names to cursor: it doesn't add extra spaces but still no double quote chars around names with special characters included ( less problematic since it can be added manually )

  • Copy values: works fine

Reproduction: create table "test@a|b" ( "test@a" int, "test|b" int )

okarika avatar Feb 28 '25 10:02 okarika