Add ecosystem component: pg_track_settings - #1944
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe core extension allowlist now includes ChangesExtension dialect handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to pg_track_settings installation now uses PostgreSQL dialect handling in Oracle-compatible mode, preventing its timestamp type incompatibility. The targeted change is ready to merge. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #1938
Overview
When
pg_track_settingscreates its tables, it declares timestamp columns astimestamp with time zone(equivalent topg_catalog.timestamptz). In IvorySQL's Oracle parser, thetimestamp with time zonespelling is resolved to thesys.oratimestamptztype, which leads to type incompatibility. We therefore need to restrict it to PG mode during initialization.Detailed Analysis
The root cause of
pg_track_settingsnot being usable — or even creatable — under Oracle compatibility mode is that its core tables and functions declare a large number of columns and return types like this:In
ora_gram.y(src/backend/oracle_parser/ora_gram.y:17310), theTIMESTAMP [WITH TIME ZONE]keywords have dedicated productions:The official PostgreSQL documentation states explicitly that
timestamptz is accepted as an abbreviation for timestamp with time zone. Meanwhile,now()— a built-in function implemented in C — always has a fixed return type ofpg_catalog.timestamptzinpg_proc, regardless of the current parser mode.