File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,11 @@ impl Dialect for DuckDbDialect {
7070 true
7171 }
7272
73+ /// Returns true if this dialect allows the `EXTRACT` function to use single quotes in the part being extracted.
74+ fn allow_extract_single_quotes ( & self ) -> bool {
75+ true
76+ }
77+
7378 // DuckDB is compatible with PostgreSQL syntax for this statement,
7479 // although not all features may be implemented.
7580 fn supports_explain_with_utility_options ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -869,3 +869,9 @@ fn test_duckdb_trim() {
869869 duckdb( ) . parse_sql_statements( error_sql) . unwrap_err( )
870870 ) ;
871871}
872+
873+ #[ test]
874+ fn parse_extract_single_quotes ( ) {
875+ let sql = "SELECT EXTRACT('month' FROM my_timestamp) FROM my_table" ;
876+ duckdb ( ) . verified_stmt ( sql) ;
877+ }
You can’t perform that action at this time.
0 commit comments