Merge pull request #92 from benesch/decimal-dec

Parse DECIMAL and DEC aliases for NUMERIC type
This commit is contained in:
Nikhil Benesch 2019-06-03 11:08:18 -04:00 committed by GitHub
commit 1ddef7aa71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

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