mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-11 00:16:21 +00:00
Support CHAR synonym for CHARACTER
https://jakewheat.github.io/sql-overview/sql-2011-foundation-grammar.html#character-string-type
This commit is contained in:
parent
23a0d032bd
commit
533775c0da
1 changed files with 1 additions and 1 deletions
|
@ -984,7 +984,7 @@ impl Parser {
|
||||||
"INT" | "INTEGER" => Ok(SQLType::Int),
|
"INT" | "INTEGER" => Ok(SQLType::Int),
|
||||||
"BIGINT" => Ok(SQLType::BigInt),
|
"BIGINT" => Ok(SQLType::BigInt),
|
||||||
"VARCHAR" => Ok(SQLType::Varchar(self.parse_optional_precision()?)),
|
"VARCHAR" => Ok(SQLType::Varchar(self.parse_optional_precision()?)),
|
||||||
"CHARACTER" => {
|
"CHAR" | "CHARACTER" => {
|
||||||
if self.parse_keyword("VARYING") {
|
if self.parse_keyword("VARYING") {
|
||||||
Ok(SQLType::Varchar(self.parse_optional_precision()?))
|
Ok(SQLType::Varchar(self.parse_optional_precision()?))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue