Add identifier quote style to Dialect trait (#1170)

This commit is contained in:
Michiel De Backker 2024-03-11 21:27:25 +01:00 committed by GitHub
parent 11899fd0cb
commit 929c646bba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 0 deletions

View file

@ -21,6 +21,10 @@ use crate::tokenizer::Token;
pub struct PostgreSqlDialect {}
impl Dialect for PostgreSqlDialect {
fn identifier_quote_style(&self, _identifier: &str) -> Option<char> {
Some('"')
}
fn is_identifier_start(&self, ch: char) -> bool {
// See https://www.postgresql.org/docs/11/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
// We don't yet support identifiers beginning with "letters with