This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git
The following commit(s) were added to refs/heads/main by this push:
new ee90373d Fix build (#1483)
ee90373d is described below
commit ee90373d35e47823c7c0b3afc39beafd1d29f9ca
Author: Yoav Cohen <[email protected]>
AuthorDate: Tue Oct 29 19:36:47 2024 +0100
Fix build (#1483)
---
src/dialect/postgresql.rs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/dialect/postgresql.rs b/src/dialect/postgresql.rs
index 51dc4984..361cc74b 100644
--- a/src/dialect/postgresql.rs
+++ b/src/dialect/postgresql.rs
@@ -230,15 +230,17 @@ pub fn parse_comment(parser: &mut Parser) ->
Result<Statement, ParserError> {
}
pub fn parse_create(parser: &mut Parser) -> Option<Result<Statement,
ParserError>> {
- let name = parser.maybe_parse(|parser| -> Result<ObjectName, ParserError> {
+ match parser.maybe_parse(|parser| -> Result<ObjectName, ParserError> {
parser.expect_keyword(Keyword::CREATE)?;
parser.expect_keyword(Keyword::TYPE)?;
let name = parser.parse_object_name(false)?;
parser.expect_keyword(Keyword::AS)?;
parser.expect_keyword(Keyword::ENUM)?;
Ok(name)
- });
- name.map(|name| parse_create_type_as_enum(parser, name))
+ }) {
+ Ok(name) => name.map(|name| parse_create_type_as_enum(parser, name)),
+ Err(e) => Some(Err(e)),
+ }
}
// https://www.postgresql.org/docs/current/sql-createtype.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]