You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostgreSQL: COMMENT ON CONSTRAINT / OPERATOR / RULE
Adds parser + AST coverage for the three remaining COMMENT ON shapes
that pgmold-sqlparser had been silently rejecting:
- `COMMENT ON CONSTRAINT name ON [DOMAIN] target IS '…'`
- `COMMENT ON OPERATOR name (left, right) IS '…'` (each side may be NONE)
- `COMMENT ON RULE name ON target IS '…'`
`Statement::Comment` gains two fields: `operator_args:
Option<CommentOperatorArgs>` (operand types for OPERATOR, modeled as
`Option<DataType>` per side so unary `NONE` is preserved), and
`on_domain: bool` (set when CONSTRAINT uses the `ON DOMAIN <domain>`
form). The existing `arguments` and `table_name` fields keep their
prior semantics for FUNCTION/PROCEDURE/AGGREGATE and TRIGGER/POLICY.
Refactors `parse_drop_operator_signature` to share the new
`parse_operator_arg_type_or_none` helper with `parse_comment`, since
both parse the `{ DataType | NONE }` slot shape.
Bumps fork to 0.63.0 and adds changelog/0.63.0.md.
Copy file name to clipboardExpand all lines: Cargo.toml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,8 @@
17
17
18
18
[package]
19
19
name = "pgmold-sqlparser"
20
-
description = "Fork of sqlparser with additional PostgreSQL features (PARTITION OF, SECURITY DEFINER/INVOKER, SET params, EXCLUDE, TEXT SEARCH, AGGREGATE, FOREIGN TABLE/FDW, PUBLICATION, SUBSCRIPTION, ALTER DOMAIN/TRIGGER/EXTENSION, CAST, CONVERSION, LANGUAGE, RULE, STATISTICS, ACCESS METHOD, EVENT TRIGGER, TRANSFORM, SECURITY LABEL, USER MAPPING, TABLESPACE, GRANT ON TYPE/DOMAIN, COMMENT ON TRIGGER/AGGREGATE/POLICY, ALTER TYPE OWNER/SCHEMA/ATTRIBUTE, ALTER DEFAULT PRIVILEGES)"
21
-
version = "0.62.0"
20
+
description = "Fork of sqlparser with additional PostgreSQL features (PARTITION OF, SECURITY DEFINER/INVOKER, SET params, EXCLUDE, TEXT SEARCH, AGGREGATE, FOREIGN TABLE/FDW, PUBLICATION, SUBSCRIPTION, ALTER DOMAIN/TRIGGER/EXTENSION, CAST, CONVERSION, LANGUAGE, RULE, STATISTICS, ACCESS METHOD, EVENT TRIGGER, TRANSFORM, SECURITY LABEL, USER MAPPING, TABLESPACE, GRANT ON TYPE/DOMAIN, COMMENT ON TRIGGER/AGGREGATE/POLICY/CONSTRAINT/OPERATOR/RULE, ALTER TYPE OWNER/SCHEMA/ATTRIBUTE, ALTER DEFAULT PRIVILEGES)"
Licensed to the Apache Software Foundation (ASF) under one
3
+
or more contributor license agreements. See the NOTICE file
4
+
distributed with this work for additional information
5
+
regarding copyright ownership. The ASF licenses this file
6
+
to you under the Apache License, Version 2.0 (the
7
+
"License"); you may not use this file except in compliance
8
+
with the License. You may obtain a copy of the License at
9
+
10
+
http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+
Unless required by applicable law or agreed to in writing,
13
+
software distributed under the License is distributed on an
14
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+
KIND, either express or implied. See the License for the
16
+
specific language governing permissions and limitations
17
+
under the License.
18
+
-->
19
+
20
+
# pgmold-sqlparser 0.63.0 Changelog
21
+
22
+
Fork-only release. Covers fork-side changes since 0.62.0; no upstream sync.
23
+
24
+
**Breaking changes:**
25
+
26
+
- PostgreSQL: `Statement::Comment` gains two fields, `operator_args: Option<CommentOperatorArgs>` (operand types for `COMMENT ON OPERATOR`, each side `Option<DataType>` to model `NONE` for unary operators) and `on_domain: bool` (set when `COMMENT ON CONSTRAINT … ON DOMAIN <domain>` is parsed). Existing destructures must be updated.
27
+
28
+
**Other:**
29
+
30
+
- PostgreSQL: `COMMENT ON CONSTRAINT name ON [DOMAIN] target IS …` is now parsed into `CommentObject::Constraint` with `table_name` carrying the relation/domain and `on_domain` distinguishing the two forms.
31
+
- PostgreSQL: `COMMENT ON OPERATOR name (left, right) IS …` is now parsed into `CommentObject::Operator` with `operator_args` carrying the operand signature; `NONE` is preserved as `None` for prefix/postfix unary operators.
32
+
- PostgreSQL: `COMMENT ON RULE name ON target IS …` is now parsed into `CommentObject::Rule` with `table_name` carrying the target relation.
0 commit comments