mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Allow literal backslash escapes for string literals in Redshift dialect. (#1801)
Co-authored-by: Roman Borschel <roman@cluvio.com>
This commit is contained in:
parent
0d2976d723
commit
cfd8951452
2 changed files with 9 additions and 0 deletions
|
@ -125,4 +125,8 @@ impl Dialect for RedshiftSqlDialect {
|
|||
fn allow_extract_single_quotes(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn supports_string_literal_backslash_escape(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -397,3 +397,8 @@ fn parse_extract_single_quotes() {
|
|||
let sql = "SELECT EXTRACT('month' FROM my_timestamp) FROM my_table";
|
||||
redshift().verified_stmt(sql);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_string_literal_backslash_escape() {
|
||||
redshift().one_statement_parses_to(r#"SELECT 'l\'auto'"#, "SELECT 'l''auto'");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue