Don't consume a second DoubleColon in parse_pg_cast

The function is invoked after a DoubleColon was already matched.
This commit is contained in:
Nickolay Ponomarev 2019-01-12 20:43:51 +03:00
parent dce09f8054
commit 89cfa9e599

View file

@ -246,7 +246,6 @@ impl Parser {
/// Parse a postgresql casting style which is in the form of `expr::datatype`
pub fn parse_pg_cast(&mut self, expr: ASTNode) -> Result<ASTNode, ParserError> {
let _ = self.consume_token(&Token::DoubleColon)?;
Ok(ASTNode::SQLCast {
expr: Box::new(expr),
data_type: self.parse_data_type()?,