Parse DECIMAL and DEC aliases for NUMERIC type

This commit is contained in:
Nikhil Benesch 2019-05-28 23:44:53 -04:00
parent 2308c1c6f7
commit 38fc920d7c
No known key found for this signature in database
GPG key ID: F7386C5DEADABA7F
2 changed files with 13 additions and 1 deletions

View file

@ -1122,7 +1122,7 @@ impl Parser {
}
}
"BYTEA" => Ok(SQLType::Bytea),
"NUMERIC" => {
"NUMERIC" | "DECIMAL" | "DEC" => {
let (precision, scale) = self.parse_optional_precision_scale()?;
Ok(SQLType::Decimal(precision, scale))
}