Skip to content

Add support for UTF8 chars in identifiers#2588

Merged
fulghum merged 2 commits intomainfrom
fulghum/utf8-identifiers
Apr 15, 2026
Merged

Add support for UTF8 chars in identifiers#2588
fulghum merged 2 commits intomainfrom
fulghum/utf8-identifiers

Conversation

@fulghum
Copy link
Copy Markdown
Contributor

@fulghum fulghum commented Apr 14, 2026

Enables use of UTF8 chars in identifiers, matching PostgreSQL behavior.

Related to #2580

@github-actions
Copy link
Copy Markdown
Contributor

Main PR
covering_index_scan_postgres 1126.62/s 1130.70/s +0.3%
index_join_postgres 158.92/s 161.25/s +1.4%
index_join_scan_postgres 209.20/s 208.04/s -0.6%
index_scan_postgres 12.13/s 12.18/s +0.4%
oltp_point_select 2380.41/s 2390.06/s +0.4%
oltp_read_only 1840.78/s 1865.28/s +1.3%
select_random_points 126.23/s 129.52/s +2.6%
select_random_ranges 831.10/s 839.26/s +0.9%
table_scan_postgres 11.75/s 11.94/s +1.6%
types_table_scan_postgres 5.41/s 5.53/s +2.2%

@fulghum fulghum requested a review from zachmu April 14, 2026 21:16
Copy link
Copy Markdown
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread core/identifiers.go
// including supplementary Unicode (emoji, code points above U+FFFF) unlike MySQL.
// https://www.postgresql.org/docs/current/sql-syntax-lexical.html
func IsValidPostgresIdentifier(name string) bool {
if len(name) == 0 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there length limits? Are they enforced elsewhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a 63 byte limit... but... the docs say that Postgres will automatically truncate longer identifiers to that limit, so we do have some work to do that truncation, but I don't think we want to return false here and reject them outright.

@github-actions
Copy link
Copy Markdown
Contributor

Main PR
Total 42090 42090
Successful 17978 17978
Failures 24112 24112
Partial Successes1 5636 5636
Main PR
Successful 42.7132% 42.7132%
Failures 57.2868% 57.2868%

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

@fulghum fulghum merged commit ecc2fb6 into main Apr 15, 2026
21 checks passed
@fulghum fulghum deleted the fulghum/utf8-identifiers branch April 15, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants