Add PostgreSQL materialized view support#513
Open
jamesbrink wants to merge 1 commit intoankane:masterfrom
Open
Add PostgreSQL materialized view support#513jamesbrink wants to merge 1 commit intoankane:masterfrom
jamesbrink wants to merge 1 commit intoankane:masterfrom
Conversation
Materialized views now appear in: - Table preview dropdown when creating/editing queries - Schema explorer page with column information Implementation: - Modified SqlAdapter.tables() to include pg_matviews via UNION ALL - Modified SqlAdapter.schema() to include matview columns via pg_attribute - Added privilege checks (has_table_privilege) to only show accessible matviews - Uses format_type() for human-readable column data types Addresses PR ankane#282 and Issue ankane#498 from upstream. Test coverage: - 8 new tests for materialized view functionality - Tests verify matviews appear in tables list and schema - Tests verify column information is correct - Tests verify queries against matviews work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for PostgreSQL materialized views in Blazer's:
This addresses a long-standing feature request that has been open for nearly 5 years.
Related Issues & PRs
Implementation
SqlAdapter.tables()changespg_classwithrelkind = 'm'for materialized viewsUNION ALLto combine with existinginformation_schema.tablesqueryhas_table_privilege()to only show accessible matviewsSqlAdapter.schema()changespg_attributefor materialized view columnsformat_type()for human-readable column data typesKey design decisions
has_table_privilege()schemasconfig settingTest Plan
Screenshots
N/A - Backend changes only, no UI modifications needed.