Fix escaping of trailing quote in quoted identifiers (#505)

* Generalize EscapeSingleQuoteString to arbitrary quote character

* Fix escaping of trailing quote in quoted identifiers

* Add new tests instead of modifying existing tests
This commit is contained in:
Riccardo Azzolini 2022-05-27 12:25:24 +02:00 committed by GitHub
parent cc2559c097
commit d19c6c323c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 18 deletions

View file

@ -1441,6 +1441,11 @@ fn parse_quoted_identifier() {
pg_and_generic().verified_stmt(r#"SELECT "quoted "" ident""#);
}
#[test]
fn parse_quoted_identifier_2() {
pg_and_generic().verified_stmt(r#"SELECT """quoted ident""""#);
}
#[test]
fn parse_local_and_global() {
pg_and_generic().verified_stmt("CREATE LOCAL TEMPORARY TABLE table (COL INT)");