Skip to content

Commit 8c289ee

Browse files
committed
Document PARTITION OF mutual exclusivity with AS SELECT and LIKE.
1 parent 5412417 commit 8c289ee

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/parser/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7891,6 +7891,12 @@ impl<'a> Parser<'a> {
78917891
// Note: This is a PostgreSQL-specific feature, but the dialect check was intentionally
78927892
// removed to allow GenericDialect and other dialects to parse this syntax. This enables
78937893
// multi-dialect SQL tools to work with PostgreSQL-specific DDL statements.
7894+
//
7895+
// PARTITION OF can be combined with other table definition clauses in the AST,
7896+
// though PostgreSQL itself prohibits PARTITION OF with AS SELECT or LIKE clauses.
7897+
// The parser accepts these combinations for flexibility; semantic validation
7898+
// is left to downstream tools.
7899+
// Child partitions can have their own constraints and indexes.
78947900
let partition_of = if self.parse_keywords(&[Keyword::PARTITION, Keyword::OF]) {
78957901
Some(self.parse_object_name(allow_unquoted_hyphen)?)
78967902
} else {

0 commit comments

Comments
 (0)