Skip to content

sql/lex: quoted SQL identifiers are not NFC-normalized #55396

@knz

Description

@knz

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.

Metadata

Metadata

Assignees

Labels

A-schema-descriptorsRelating to SQL table/db descriptor handling.A-sql-syntaxIssues 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.S-3-ux-surpriseIssue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions