Conversation
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PostgreSQL
COMMENT ON INDEX idx IS 'description'and seven other catalog target kinds currently fail to parse. This adds structured support forINDEX,SCHEMA,SEQUENCE,DOMAIN,TYPE,MATERIALIZED VIEW,FUNCTION, andCONSTRAINT, including constraints owned by a table or domain.CommentTargetpreserves object names and constraint ownership, and reusesRoutineReferencefor function signatures, argument modes, names, and types. The existing table/column/view accessors remain available. Comment rendering is shared with the statement deparser, visitors can traverse explicit relations and literals, and table discovery avoids treating indexes, types, domains, sequences, or functions as tables. A dedicated validator exposes target-specific capabilities.Regression coverage includes quoted dotted identifiers, qualified and Unicode names, optional function signatures,
ON DOMAINversus a table nameddomain, comment removal, tagged dollar strings, AST round trips, and custom visitor/deparser behavior. Unambiguous target syntax works without a dialect preset; tagged dollar strings retain their existing PostgreSQL/explicit-option requirement.Validation
./gradlew spotlessApply check --max-workers=2 --no-daemonwith the formatting ratchet pinned to base6312f9e5: 6,994 tests, zero failures/errors, 25 skipped; formatting, PMD and SpotBugs passed.EXPORT_TEST_TO_FILE=False mvn -B clean verify: 6,976 tests, zero failures/errors, 25 skipped.This follows up on the eight unsupported COMMENT targets identified during #2638's audit. It is based directly on master and can merge independently of #2638. Other PostgreSQL COMMENT target kinds are outside this change.
Reference: PostgreSQL 18 COMMENT syntax.