Clarify PostgreSQL DO support and verify the reported block - #2633
Merged
manticore-projects merged 2 commits intoSep 13, 2026
Merged
manticore-projects merged 2 commits into
manticore-projects merged 2 commits into
Conversation
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
DOstatements are already accepted withDialect.POSTGRESQL, but the unsupported-grammar guide still labels them unsupported. Correct the procedural-support description and add a usage example showing the required dialect and access to the preserved body literal.Replace the simplified regression with the full SQL reported in the issue. Verify exact body preservation, including nested SQL, non-ASCII strings and internal semicolons, while statements before and after the block remain separate. Check deparser output and reparsing with unsupported-statement fallback disabled. Include the fixture's standard license header and compare the emitted statement independently of leading comments, so Gradle and Maven exercise the same input.
The body remains an opaque
StringValue; parsing or validating its internal procedural statements is deferred. This follows the PostgreSQL DO syntax, which takes a string literal and allowsLANGUAGEbefore or after it. The reportedEND $$;is valid: the outermost PL/pgSQL END does not require a semicolon. No production parser or AST code changes are needed for this scope.Closes #1946.
Validation:
./gradlew check: passed, 6,904 tests, 0 failures/errors, 25 skipped.mvn --batch-mode --no-transfer-progress verify: passed, 6,886 tests, 0 failures/errors, 25 skipped.