|
1 | | -not started — see previous status docs for format style. |
| 1 | +# PostgreSQL 16-to-17 AST Transformer Status |
| 2 | + |
| 3 | +## Current Status: 98.8% Complete (255/258 tests passing) |
| 4 | + |
| 5 | +### Test Results (Confirmed: June 28, 2025) |
| 6 | +- **Total tests**: 258 |
| 7 | +- **Passing**: 255 (98.8%) |
| 8 | +- **Failing**: 3 (1.2%) |
| 9 | + |
| 10 | +### Progress Summary |
| 11 | +- ✅ **Core transformer implementation**: Complete |
| 12 | +- ✅ **Basic AST node transformations**: Complete |
| 13 | +- ✅ **Domain creation contexts**: Fixed |
| 14 | +- ✅ **SELECT statement contexts**: Fixed |
| 15 | +- ⚠️ **Complex nested contexts**: 3 remaining failures |
| 16 | + |
| 17 | +### Remaining Test Failures |
| 18 | +1. **pretty-misc.test.ts**: JSON TypeCast prefix handling |
| 19 | + - Issue: Transformer adding pg_catalog prefix when expected output has none |
| 20 | + - Context: WITH clauses containing A_Expr with JSON TypeCasts |
| 21 | + - Status: Logic needs to be reversed - remove prefixes instead of adding them |
| 22 | + |
| 23 | +2. **misc-quotes_etc.test.ts**: String escaping issue |
| 24 | + - Issue: \v character handling difference between PG16/PG17 |
| 25 | + - Expected: `\v` → Received: `v` |
| 26 | + - Status: Likely parser-level difference, not transformer issue |
| 27 | + |
| 28 | +3. **latest-postgres-create_am.test.ts**: CREATE ACCESS METHOD syntax |
| 29 | + - Issue: `syntax error at or near "DEFAULT"` |
| 30 | + - Status: PG16 parser limitation - syntax not supported in PG16 |
| 31 | + |
| 32 | +### Key Insights |
| 33 | +- **JSON prefix logic**: Test failures show expected output does NOT want pg_catalog prefixes |
| 34 | +- **String escaping**: PG16/PG17 parser difference in escape sequence handling |
| 35 | +- **CREATE ACCESS METHOD**: PG16 parser doesn't support this PG17 syntax feature |
| 36 | + |
| 37 | +### Technical Details |
| 38 | +- **Branch**: pg16-pg17-transformer |
| 39 | +- **PR**: #177 (https://github.com/launchql/pgsql-parser/pull/177) |
| 40 | +- **Last test run**: June 28, 2025 20:47 UTC |
| 41 | +- **Current approach**: Context-aware transformation based on parent node types |
| 42 | + |
| 43 | +### Next Steps to Achieve 100% |
| 44 | +1. **Remove JSON pg_catalog prefix logic entirely** from TypeCast method |
| 45 | +2. **Investigate String method** for \v character handling |
| 46 | +3. **Document CREATE ACCESS METHOD limitation** as expected PG16 parser constraint |
| 47 | +4. **Final test run** to confirm 258/258 success rate |
0 commit comments