Skip to content

Conversation

@tianzhou
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 23, 2025 09:15
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 PR simplifies view comparison logic by removing the AST-based semantic comparison in favor of direct string comparison. The change is based on the fact that both view definitions come from pg_get_viewdef() at the same PostgreSQL version, which provides normalized output, making complex AST comparison unnecessary.

Key Changes:

  • Removed pg_query_go dependency and all AST-based comparison logic
  • Simplified view comparison to use direct string matching
  • Deleted comprehensive test suite for semantic view comparison

Reviewed Changes

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

File Description
internal/diff/view_comparison_test.go Removed entire test file containing semantic comparison tests
internal/diff/view.go Removed pg_query_go import, simplified viewsEqual and generateModifyViewsSQL to use string comparison, deleted all AST comparison functions
go.mod Removed pg_query_go/v6 and google.golang.org/protobuf dependencies

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tianzhou tianzhou merged commit 3d5009d into main Oct 23, 2025
2 checks passed
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