Skip to content

PostgreSQL: Support REFRESH MATERIALIZED VIEW - #2769

Merged
LucaCappelletti94 merged 6 commits into
mainfrom
upstream/refresh-materialized-view
Oct 31, 2026
Merged

LucaCappelletti94 merged 6 commits into
mainfrom
upstream/refresh-materialized-view

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

REFRESH MATERIALIZED VIEW m and REFRESH MATERIALIZED VIEW CONCURRENTLY app.m WITH NO DATA failed under every dialect with Expected: an SQL statement, found: REFRESH

This adds Statement::RefreshMaterializedView, holding the view name, whether CONCURRENTLY was written and the optional WITH [NO] DATA. The name is visited as a relation. The statement parses in every dialect, as VACUUM and RESET do. WITH [NO] DATA is an Option<bool> because the existing WithData also carries Teradata's AND [NO] STATISTICS, which REFRESH does not take.

docs: https://www.postgresql.org/docs/current/sql-refreshmaterializedview.html

@codecov-commenter

codecov-commenter commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.85%. Comparing base (45fe354) to head (90d9cdc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2769      +/-   ##
==========================================
+ Coverage   82.83%   82.85%   +0.01%     
==========================================
  Files          42       42              
  Lines       35900    35935      +35     
  Branches    35900    35935      +35     
==========================================
+ Hits        29739    29774      +35     
  Misses       2654     2654              
  Partials     3507     3507              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/refresh-materialized-view branch from 84a5ea7 to 6cec5da Compare October 29, 2026 18:17

@sabir-akhadov-localstack sabir-akhadov-localstack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/refresh-materialized-view branch from 3dced19 to cea869c Compare October 30, 2026 19:12
@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/refresh-materialized-view branch from cea869c to 98a0df9 Compare October 31, 2026 08:49
@LucaCappelletti94

Copy link
Copy Markdown
Contributor Author

Thanks @sabir-akhadov-localstack for the review, I have added a couple more tests and the missing span impl. I will be merging this now.

cc @alamb

@LucaCappelletti94
LucaCappelletti94 added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 94fa700 Oct 31, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants