mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-09 18:04:59 +00:00
added ability to parse extension to parse_comment inside postgres dialect (#1451)
This commit is contained in:
parent
e849f7f143
commit
8ccb87a835
3 changed files with 21 additions and 0 deletions
|
@ -2902,6 +2902,21 @@ fn parse_comments() {
|
|||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
match pg().verified_stmt("COMMENT ON EXTENSION plpgsql IS 'comment'") {
|
||||
Statement::Comment {
|
||||
object_type,
|
||||
object_name,
|
||||
comment: Some(comment),
|
||||
if_exists,
|
||||
} => {
|
||||
assert_eq!("comment", comment);
|
||||
assert_eq!("plpgsql", object_name.to_string());
|
||||
assert_eq!(CommentObject::Extension, object_type);
|
||||
assert!(!if_exists);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
match pg().verified_stmt("COMMENT ON TABLE public.tab IS 'comment'") {
|
||||
Statement::Comment {
|
||||
object_type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue