-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql/lex: quoted SQL identifiers are not NFC-normalized #55396
Copy link
Copy link
Closed
Labels
A-schema-descriptorsRelating to SQL table/db descriptor handling.Relating to SQL table/db descriptor handling.A-sql-syntaxIssues strictly related to the SQL grammar, with no semantic aspectIssues strictly related to the SQL grammar, with no semantic aspectC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.S-3-ux-surpriseIssue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Description
CockroachDB, like PostgreSQL, intends to preserve the case of SQL identifier that are entered between double quotes, such that e.g.
CREATE TABLE "Abc"
CREATE ROLE "Abc"
preserve the case and result in a thing named "Abc".
Meanwhile, without double quotes the identified is case-folded and unicode-folded with NFC.
However, we want the NFC to occur also with double-quoted identifiers! This is because we do not want to have e.g. two tables named "è", one named with the single accented later and one with the 3-character combined diacritic.
Today this normalization does not take place, so we can see these ambiguous table/db/column names side-by-side which is poor UX.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-schema-descriptorsRelating to SQL table/db descriptor handling.Relating to SQL table/db descriptor handling.A-sql-syntaxIssues strictly related to the SQL grammar, with no semantic aspectIssues strictly related to the SQL grammar, with no semantic aspectC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.S-3-ux-surpriseIssue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)