New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block REFRESH MATERIALIZED VIEW on caggs #2464
Conversation
5a3d452
to
11cd2d0
Compare
Codecov Report
@@ Coverage Diff @@
## master #2464 +/- ##
==========================================
+ Coverage 89.99% 90.12% +0.12%
==========================================
Files 213 213
Lines 34406 34350 -56
==========================================
- Hits 30964 30958 -6
+ Misses 3442 3392 -50
Continue to review full report at Codecov.
|
if (cagg) | ||
ereport(ERROR, | ||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), | ||
errmsg("operation not supported on continuous aggregate"), | ||
errdetail("A continuous aggregate does not support REFRESH MATERIALIZED VIEW."), | ||
errhint("Use \"refresh_continuous_aggregate\" or set up a policy to refresh the " | ||
"continuous aggregate."))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No test coverage for this piece of code. Add a test?
-- Test that REFRESH MATERIALIZED VIEW works as an alternative to | ||
-- refresh_continuous_aggregate() | ||
REFRESH MATERIALIZED VIEW weekly_temp_without_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could keep this REFRESH
and just check that it generates an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I support that there should be a test for calling REFRESH MATERIALIZED VIEW
and getting the error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like missing the error case as @mkindahl pointed out
670d38e
to
f37eb1c
Compare
f37eb1c
to
a566f85
Compare
No description provided.