database: improve subscription view#1542
Conversation
581cb4d to
18cbc5c
Compare
| j.jobbytes / 1000000 AS total_mb, | ||
| CASE | ||
| WHEN f.filesettext ILIKE '%{%{%File%=%' THEN NULL | ||
| WHEN f.filesettext ILIKE '%{%{%File%=%' AND f.filesettext NOT ILIKE '%:config_file%=%' THEN NULL |
There was a problem hiding this comment.
Ignoring config_file= feels oddly specific.
Wouldn't reordering the WHENs to move the File= to the bottom achieve the same goal?
Otherwise we could rewrite ILIKE '%{%{%File%=%' to something like SIMILAR TO '%{%{\s*File\s*=%' which is less portable, but as we're PostgreSQL-only now shouldn't be an issue.
There was a problem hiding this comment.
I would avoid regexp but in that particular case, it is certainly the best possible option as it will highly simplifies the string especially if in the same time we move the file to the end of each block.
Will do a proposal with that solution.
arogge
left a comment
There was a problem hiding this comment.
That looks pretty good!
Maybe we should add a comment above the view definition to tell people that the ordering is actually important.
- fix subscription view for plugin with parameter config_file - move create update versionid to end of ddl Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- filter Estimate sentence in testrunner - add additionnal resulting blank line in expected output Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- reorder match for File= plugin - add missing plugin - webui adjust copyright year
fb38cbb to
f3dbaca
Compare
OP#5449 OP#5488
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests