duckdb-web icon indicating copy to clipboard operation
duckdb-web copied to clipboard

Identifier case sensitivity / SQL standard

Open rpbouman opened this issue 1 year ago • 0 comments

In https://duckdb.org/docs/sql/keywords_and_identifiers, it reads:

"Following the convention of the SQL standard, identifiers in DuckDB are case-insensitive."

The remark about the standard is not entirely correct. AFIK, the SQL standard treats "delimited identifiers" (quoted identifiers) as case sensitive. (I can dig up the relevant lines from the spec if required).

This is not just a thing in the standard, major products like SQL Server, Postgres, Snowflake, SAP HANA, etc also treat delimited identifiers as case-sensitive. (see for example: https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS, "Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case.")

rpbouman avatar May 16 '24 03:05 rpbouman