From 2adc6203b4696a5764a3881fc6880d8a09a4660b Mon Sep 17 00:00:00 2001 From: Yoav Cohen Date: Mon, 30 Jun 2025 20:54:08 +0200 Subject: [PATCH] Redshift support for multibyte UTF-8 identifiers --- src/dialect/redshift.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dialect/redshift.rs b/src/dialect/redshift.rs index 5d41ebcb..9ad9c5fd 100644 --- a/src/dialect/redshift.rs +++ b/src/dialect/redshift.rs @@ -82,13 +82,13 @@ impl Dialect for RedshiftSqlDialect { fn is_identifier_start(&self, ch: char) -> bool { // Extends Postgres dialect with sharp and UTF-8 multibyte chars // https://docs.aws.amazon.com/redshift/latest/dg/r_names.html - PostgreSqlDialect {}.is_identifier_start(ch) || ch == '#' || ch as u32 > 0x7F + PostgreSqlDialect {}.is_identifier_start(ch) || ch == '#' || !ch.is_ascii() } fn is_identifier_part(&self, ch: char) -> bool { // Extends Postgres dialect with sharp and UTF-8 multibyte chars // https://docs.aws.amazon.com/redshift/latest/dg/r_names.html - PostgreSqlDialect {}.is_identifier_part(ch) || ch == '#' || ch as u32 > 0x7F + PostgreSqlDialect {}.is_identifier_part(ch) || ch == '#' || !ch.is_ascii() } /// redshift has `CONVERT(type, value)` instead of `CONVERT(value, type)`