Skip to content

Conversation

@tianzhou
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings January 12, 2026 10:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the IR module to enhance code readability by extracting inline maps, constants, and duplicate logic into well-documented, reusable components.

Changes:

  • Extracted type mapping dictionaries and constants to package-level for better maintainability and performance
  • Eliminated duplicate logic between Function and Procedure argument handling
  • Replaced inconsistent string conversion calls with the existing safeInterfaceToString helper

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
ir/normalize.go Extracted postgresTypeNormalization map from function to package-level variable
ir/ir.go Deduplicated Function/Procedure argument extraction logic into shared helper functions
ir/inspector.go Extracted constants for trigger types and sequence max values, oidToTypeName map, and sequence max value helper; standardized string conversions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tianzhou tianzhou merged commit 52165e4 into main Jan 12, 2026
8 checks passed
alecthomas pushed a commit to alecthomas/pgschema that referenced this pull request Jan 26, 2026
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.

1 participant