From af07bb3fcb5421040231923b589a54d47d7e6d31 Mon Sep 17 00:00:00 2001 From: be happy Date: Wed, 11 Dec 2024 16:55:42 +0800 Subject: [PATCH] [postgresql] Fix for #4354 (#4354) --- sql/postgresql/PostgreSQLLexer.g4 | 4 ++++ sql/postgresql/PostgreSQLParser.g4 | 2 ++ 2 files changed, 6 insertions(+) diff --git a/sql/postgresql/PostgreSQLLexer.g4 b/sql/postgresql/PostgreSQLLexer.g4 index 7538b65d04..8f0df257d8 100644 --- a/sql/postgresql/PostgreSQLLexer.g4 +++ b/sql/postgresql/PostgreSQLLexer.g4 @@ -1317,6 +1317,10 @@ InvalidUnterminatedHexadecimalStringConstant: 'X' UnterminatedStringConstant; Integral: Digits; +HexadecimalIntegral: '0x' Digits; + +BinaryIntegral: '0b' Digits; + NumericFail: Digits '..' {this.HandleNumericFail();}; Numeric: diff --git a/sql/postgresql/PostgreSQLParser.g4 b/sql/postgresql/PostgreSQLParser.g4 index e0e1263baa..f83a173cbe 100644 --- a/sql/postgresql/PostgreSQLParser.g4 +++ b/sql/postgresql/PostgreSQLParser.g4 @@ -4345,6 +4345,8 @@ fconst iconst : Integral + | HexadecimalIntegral + | BinaryIntegral ; sconst