Skip to content

Comments

chore: generated_column test case#184

Merged
tianzhou merged 1 commit intomainfrom
generated_column
Dec 2, 2025
Merged

chore: generated_column test case#184
tianzhou merged 1 commit intomainfrom
generated_column

Conversation

@tianzhou
Copy link
Contributor

@tianzhou tianzhou commented Dec 2, 2025

Trying to reproduce #183

Copilot AI review requested due to automatic review settings December 2, 2025 06:41
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 adds a comprehensive test case to reproduce and verify the fix for GitHub issue #183, which concerns the handling of generated column expressions during schema dumps. The test validates that complex expressions in GENERATED ALWAYS AS clauses are correctly preserved.

  • Adds test data files demonstrating three scenarios: boolean expressions with type casting, string concatenation with TRIM, and tsvector generation with COALESCE
  • Implements an integration test following the established test pattern
  • Includes detailed documentation explaining the test scenarios

Reviewed changes

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

Show a summary per file
File Description
testdata/dump/issue_183_generated_column/raw.sql Defines the raw SQL schema with three test cases for generated columns, including detailed comments explaining each scenario
testdata/dump/issue_183_generated_column/pgschema.sql Expected pgschema output showing normalized generated column expressions (redundant type casts removed)
testdata/dump/issue_183_generated_column/pgdump.sql Reference pg_dump output for comparison, confirming PostgreSQL's normalization of the expressions
testdata/dump/issue_183_generated_column/manifest.json Test metadata describing the purpose and scenarios covered by this test case
cmd/dump/dump_integration_test.go Adds the test function following the established pattern for integration tests

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

@tianzhou tianzhou merged commit cf9cd14 into main Dec 2, 2025
8 checks passed
@tianzhou tianzhou deleted the generated_column branch December 5, 2025 15:44
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