Skip to content

Commit 2adc620

Browse files
committed
Redshift support for multibyte UTF-8 identifiers
1 parent f90ba8b commit 2adc620

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dialect/redshift.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ impl Dialect for RedshiftSqlDialect {
8282
fn is_identifier_start(&self, ch: char) -> bool {
8383
// Extends Postgres dialect with sharp and UTF-8 multibyte chars
8484
// https://docs.aws.amazon.com/redshift/latest/dg/r_names.html
85-
PostgreSqlDialect {}.is_identifier_start(ch) || ch == '#' || ch as u32 > 0x7F
85+
PostgreSqlDialect {}.is_identifier_start(ch) || ch == '#' || !ch.is_ascii()
8686
}
8787

8888
fn is_identifier_part(&self, ch: char) -> bool {
8989
// Extends Postgres dialect with sharp and UTF-8 multibyte chars
9090
// https://docs.aws.amazon.com/redshift/latest/dg/r_names.html
91-
PostgreSqlDialect {}.is_identifier_part(ch) || ch == '#' || ch as u32 > 0x7F
91+
PostgreSqlDialect {}.is_identifier_part(ch) || ch == '#' || !ch.is_ascii()
9292
}
9393

9494
/// redshift has `CONVERT(type, value)` instead of `CONVERT(value, type)`

0 commit comments

Comments
 (0)