Skip to content

Conversation

@pyramation
Copy link
Collaborator

No description provided.

…AM_IN to FUNC_PARAM_DEFAULT

Co-Authored-By: Dan Lynch <[email protected]>
- Document multi-version parser interface (@pgsql/parser) vs wrong single-version parser
- Include parse(), PgParser class, and version-specific import examples
- Explain sval vs str field naming discrepancy caused by using wrong parser
- Prevent future ACU waste by documenting correct parsing approach

Co-Authored-By: Dan Lynch <[email protected]>
…jfuncargs refinement

- Add context-sensitive funcformat detection (COERCE_SQL_SYNTAX for pg_catalog functions)
- Fix FunctionParameter mode conversion from FUNC_PARAM_IN to FUNC_PARAM_DEFAULT
- Refine objfuncargs preservation logic to be more restrictive
- Improve test pass rate from 28.7% to 40.3% (104/258 passing tests)

Co-Authored-By: Dan Lynch <[email protected]>
- Set shouldPreserveObjfuncargs to always return false for universal removal
- Test results show 40.3% pass rate unchanged, indicating need for more targeted approach
- Next: analyze specific failing test patterns for surgical objfuncargs handling

Co-Authored-By: Dan Lynch <[email protected]>
…uncformat should not get one added

Co-Authored-By: Dan Lynch <[email protected]>
…RAM_DEFAULT doesn't exist in enum

Co-Authored-By: Dan Lynch <[email protected]>
…serve objfuncargs in RenameStmt

Co-Authored-By: Dan Lynch <[email protected]>
…OT_SET

- Removes override field when it has default value OVERRIDING_NOT_SET
- Properly transforms all child nodes (relation, cols, selectStmt, etc.)
- Addresses non-funcformat test failures in updatable_views and rangetypes tests

Co-Authored-By: Dan Lynch <[email protected]>
- Change default behavior to preserve objfuncargs in most contexts
- Only remove objfuncargs in specific contexts (AlterFunctionStmt, CreateCastStmt)
- Addresses objfuncargs removal issues in alter_generic and other tests
- Simplifies logic by defaulting to preservation rather than removal

Co-Authored-By: Dan Lynch <[email protected]>
- Remove unnecessary mode transformation logic in FunctionParameter method
- Preserve all mode values as-is for PG13 to PG14 transformation
- Addresses mode field removal issues in plpgsql and other tests
- Simplifies logic by avoiding context-specific mode conversions

Co-Authored-By: Dan Lynch <[email protected]>
- Remove override field deletion logic that was causing regressions
- Tests expect override field to be preserved, not removed
- Addresses updatable_views and rangetypes test failures
- Should restore pass rate from 54 back to previous 78+ passing tests

Co-Authored-By: Dan Lynch <[email protected]>
… FUNC_PARAM_DEFAULT

- Add logic to convert FUNC_PARAM_IN to FUNC_PARAM_DEFAULT for PG13 -> PG14
- Preserve FUNC_PARAM_VARIADIC and other modes unchanged
- Addresses plpgsql and alter_generic test failures
- Should provide significant improvement to pass rate

Co-Authored-By: Dan Lynch <[email protected]>
- Remove AlterFunctionStmt from contexts that should not preserve objfuncargs
- Based on test evidence showing objfuncargs should be preserved in most contexts
- Only remove objfuncargs in CreateCastStmt contexts where PG14 doesn't expect them

Co-Authored-By: Dan Lynch <[email protected]>
- Add override field handling to InsertStmt method
- Preserve override field values when present
- Based on test evidence showing override fields in expected output

Co-Authored-By: Dan Lynch <[email protected]>
…FUNC_PARAM_DEFAULT in FunctionParameter

Co-Authored-By: Dan Lynch <[email protected]>
…ted FunctionParameter nodes

- Added List transformation method to handle List.items properly
- This enables FunctionParameter mode transformation (FUNC_PARAM_IN -> FUNC_PARAM_DEFAULT) to work correctly
- Fixed TypeScript error with explicit type annotation for map callback
- Test results: 151 failed, 107 passed (improved from 155 failed, 103 passed)

Co-Authored-By: Dan Lynch <[email protected]>
…->PG14 compatibility

- Add A_Expr transformation with AEXPR_OF->AEXPR_IN and AEXPR_PAREN->AEXPR_OP mappings
- Add TypeName, ColumnRef, A_Const, A_Star, SortBy transformations for proper field handling
- Add CreateDomainStmt, CreateSeqStmt, AlterSeqStmt transformations for domain and sequence support
- Add RoleSpec and AlterTableCmd transformations for role and table alteration support
- Improved test pass rate from 107/258 (41.5%) to 123/258 (47.7%) - gained 16 more passing tests

Co-Authored-By: Dan Lynch <[email protected]>
…methods

- Fixed ColumnRef, A_Const, FuncCall, Integer, Float, BitString node wrapping
- Improved v15-to-v16 transformer from 2/258 to 7/258 passing tests
- Following v13-to-v14 transformer patterns for consistent node wrapping
- All methods now properly transform child nodes and return wrapped results

Co-Authored-By: Dan Lynch <[email protected]>
…-v16 transformer

- Fixed A_Expr with proper name, lexpr, rexpr transformation
- Fixed BoolExpr with args array transformation
- Fixed Alias with colnames array transformation
- Fixed Boolean with boolval field transformation
- Continuing systematic node wrapping approach following v13-to-v14 patterns

Co-Authored-By: Dan Lynch <[email protected]>
…tar in v15-to-v16

- Fixed A_ArrayExpr with elements array transformation
- Fixed A_Indices with lidx/uidx transformation
- Fixed A_Indirection with arg and indirection array transformation
- Fixed A_Star with empty result wrapper
- Switching focus back to v14-to-v15 transformer as requested

Co-Authored-By: Dan Lynch <[email protected]>
…-v14 patterns

- Updated visit method to use transformGenericNode as fallback when no specific method exists
- Made transformGenericNode private for consistency with v13-to-v14 transformer
- This should fix the core issue where String and other node transformations weren't being called
- Updated STATUS files to reflect current progress: 13-14 at 237/258, 14-15 at 5/258 (testing improvements)
- Following Dan's request to focus on 14-15 transformer instead of 15-16

Co-Authored-By: Dan Lynch <[email protected]>
- Updated test results: 6/258 passing (improved from 2/258)
- Noted that String transformation issues persist despite visit method fixes
- Ready to stop work as requested by Dan

Co-Authored-By: Dan Lynch <[email protected]>
- Add TypeName method to handle pg_catalog prefix for JSON types
- Implement VALUES context detection to exclude JSON types in VALUES clauses
- Fix List method to properly propagate transformation context
- Add context helper methods for different transformation scenarios
- Update version number to 170004 for PG17 compatibility

Current status: VALUES context detection working but still debugging test failures

Co-Authored-By: Dan Lynch <[email protected]>
- Removed all pg_catalog prefix logic for JSON types
- Still investigating root cause of test failures
- 9 tests still failing, need to understand structural differences

Co-Authored-By: Dan Lynch <[email protected]>
… add pg_catalog prefix for JSON types

- Fixed critical issue where TypeName nodes were unwrapped when reaching TypeCast method
- Added direct handling of unwrapped TypeName data in TypeCast method
- Implemented pg_catalog prefix logic for JSON types in PG17
- Reduced failing tests from 11 to 4 out of 258 total tests
- JSON type transformation now working correctly for most cases

Co-Authored-By: Dan Lynch <[email protected]>
- Removed unconditional JSON pg_catalog prefix addition from TypeName method
- Down to 8 failing tests out of 258 total (250 passing)
- All remaining failures are related to pg_catalog prefixes being added to JSON types
- Need to investigate source of pg_catalog prefixes since they persist after removal

Co-Authored-By: Dan Lynch <[email protected]>
…refix handling

- Add TypeCast method to handle both wrapped and unwrapped TypeName results
- Implement JSON type detection and pg_catalog prefix addition
- Achieve 255/258 tests passing (98.8% success rate) in kitchen-sink/16-17 suite
- Follow v13-to-v14 transformer patterns for consistency
- Handle edge cases in TypeName transformation for JSON types

Co-Authored-By: Dan Lynch <[email protected]>
…ethod

- Simplified TypeCast method to basic pass-through transformation
- Removed context-insensitive JSON prefix addition that was causing test failures
- Current status: 249/258 tests passing (9 failures remaining)
- Need targeted approach for JSON prefix logic based on specific contexts

Co-Authored-By: Dan Lynch <[email protected]>
…st methods

- Simplified both methods to basic pass-through transformations
- Current status: 250/258 tests passing (8 failures remaining)
- Ready to implement targeted JSON prefix logic for specific contexts

Co-Authored-By: Dan Lynch <[email protected]>
@pyramation pyramation closed this Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants