Closed
Conversation
- Add support for nulls_not_distinct property in UNIQUE constraint handler - Resolves AST mismatch issues in misc-issues test for PostgreSQL 17 features - All 254/254 deparser tests now passing (100%) Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Add catalogname support to RangeVar deparser method - Handle catalog.schema.table format properly in SQL output - Fix misc/issues-7.sql test: 'SELECT * from foo.bar.baz' now correctly includes catalogname - All 254/254 tests now passing (100%) - Update TESTS.md to reflect catalogname support Co-Authored-By: Dan Lynch <pyramation@gmail.com>
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.
Fix Catalogname Handling in RangeVar for Three-Part Table Names
Summary
Fixed failing deparser test in
misc-issues.test.tsby implementing missing catalogname support in RangeVar nodes, enabling proper handling of three-part table names (catalog.schema.table) in PostgreSQL SQL statements.Changes Made
catalog.schema.tableformat when catalogname is presentTechnical Details
The issue was in the
RangeVarmethod indeparser.tswhere the table name construction only handledschemaname.relnamebut ignoredcatalogname. The fix adds proper catalogname handling:Test Results
SELECT * from foo.bar.bazdeparsed asSELECT * FROM bar.baz(missing catalogname)SELECT * from foo.bar.bazcorrectly deparsed asSELECT * FROM foo.bar.bazVerification
The AST comparison now succeeds for the parse/deparse/reparse cycle, confirming that catalogname is properly preserved in the deparser output.
Link to Devin run
https://app.devin.ai/sessions/e2a49c9a83094092a217b1c66ad778de
Requested by: Dan Lynch (pyramation@gmail.com)