Skip to content

Fixed an issue where column comments were not being displayed for materialized views on the SQL tab. #9486#9602

Open
pravesh-sharma wants to merge 1 commit intopgadmin-org:masterfrom
pravesh-sharma:GH-9486
Open

Fixed an issue where column comments were not being displayed for materialized views on the SQL tab. #9486#9602
pravesh-sharma wants to merge 1 commit intopgadmin-org:masterfrom
pravesh-sharma:GH-9486

Conversation

@pravesh-sharma
Copy link
Contributor

@pravesh-sharma pravesh-sharma commented Feb 6, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved materialized view SQL generation to properly include view column definitions.
    • Enhanced schema information retrieval and propagation for views and materialized views.

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

Walkthrough

Modified the view properties handling in pgAdmin to include view columns SQL retrieval in materialized view SQL generation and to capture and propagate the view schema in two property fetch methods (_fetch_mview_properties and _fetch_properties).

Changes

Cohort / File(s) Summary
View Schema and Columns SQL Enhancement
web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py
Added retrieval of view columns SQL via get_columns_sql(did, vid) into materialized view SQL generation path. Captured view schema by assigning self.view_schema = result.get('schema') in both _fetch_mview_properties and _fetch_properties methods after result merge operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main fix: enabling column comments display for materialized views on the SQL tab, with issue reference #9486.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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