-
Notifications
You must be signed in to change notification settings - Fork 675
Add PostgreSQL PARTITION OF syntax support #2127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7833,6 +7833,15 @@ impl<'a> Parser<'a> { | |||||||||
| let if_not_exists = self.parse_keywords(&[Keyword::IF, Keyword::NOT, Keyword::EXISTS]); | ||||||||||
| let table_name = self.parse_object_name(allow_unquoted_hyphen)?; | ||||||||||
|
|
||||||||||
| // PostgreSQL PARTITION OF for child partition tables | ||||||||||
| let partition_of = if dialect_of!(self is PostgreSqlDialect | GenericDialect) | ||||||||||
| && self.parse_keywords(&[Keyword::PARTITION, Keyword::OF]) | ||||||||||
|
||||||||||
| // PostgreSQL PARTITION OF for child partition tables | |
| let partition_of = if dialect_of!(self is PostgreSqlDialect | GenericDialect) | |
| && self.parse_keywords(&[Keyword::PARTITION, Keyword::OF]) | |
| let partition_of = if self.parse_keywords(&[Keyword::PARTITION, Keyword::OF]) |
If possible we can skiip the dialect check and let the parser accept the PARTITION OF clause whenever it shows up in an input sql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// Parse PostgreSQL partition bound specification for PARTITION OF. | |
| /// | |
| /// Parses: `FOR VALUES partition_bound_spec | DEFAULT` | |
| /// Parse [ForValues] of a `PARTITION OF` clause. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// Parse a single partition bound value (MINVALUE, MAXVALUE, or expression). | |
| /// Parse a single [PartitionBoundValue]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0c6857f