Allow single quotes in EXTRACT() for Redshift. (#1795)

Co-authored-by: Roman Borschel <roman@cluvio.com>
This commit is contained in:
Roman Borschel 2025-04-04 22:18:31 +02:00 committed by GitHub
parent a847e44105
commit 3ed4ad9c66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -121,4 +121,8 @@ impl Dialect for RedshiftSqlDialect {
fn supports_array_typedef_with_brackets(&self) -> bool {
true
}
fn allow_extract_single_quotes(&self) -> bool {
true
}
}

View file

@ -391,3 +391,9 @@ fn test_parse_nested_quoted_identifier() {
.parse_sql_statements(r#"SELECT 1 AS ["1]"#)
.is_err());
}
#[test]
fn parse_extract_single_quotes() {
let sql = "SELECT EXTRACT('month' FROM my_timestamp) FROM my_table";
redshift().verified_stmt(&sql);
}