added ability to parse extension to parse_comment inside postgres dialect (#1451)

This commit is contained in:
Maxwell Knight 2024-10-04 23:07:26 +03:00 committed by GitHub
parent e849f7f143
commit 8ccb87a835
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 0 deletions

View file

@ -205,6 +205,10 @@ pub fn parse_comment(parser: &mut Parser) -> Result<Statement, ParserError> {
let object_name = parser.parse_object_name(false)?;
(CommentObject::Table, object_name)
}
Token::Word(w) if w.keyword == Keyword::EXTENSION => {
let object_name = parser.parse_object_name(false)?;
(CommentObject::Extension, object_name)
}
_ => parser.expected("comment object_type", token)?,
};