Skip to content
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

test: materialized view privileges #2209

Merged
merged 10 commits into from Nov 12, 2021

Conversation

mgrobaker
Copy link
Contributor

  • Add materialized view to set up and tear down
  • Add test for materialized view privileges
  • Make helper function to reduce repeated code around testing privileges

Fixes #2060

Add to TestUtil and also to DatabaseMetaData setup and teardown

fixes pgjdbc#2060
make "matviewtest" all lowercase so it can be found in pg catalog, which lowercases all names

fixes pgjdbc#2060
Remove reused code
Add comments
Statement st = con.createStatement();
try {
// Drop the view
dropView(con, matViewName);
Copy link
Member

Choose a reason for hiding this comment

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

This should be dropMaterializedView(...).

pgjdbc/src/test/java/org/postgresql/test/TestUtil.java Outdated Show resolved Hide resolved
@@ -73,7 +73,6 @@ public void setUp() throws Exception {
}
TestUtil.createTable(con, "metadatatest",
"id int4, name text, updated timestamptz, colour text, quest text");
TestUtil.createTable(con, "precision_test", "implicit_precision numeric");
Copy link
Member

Choose a reason for hiding this comment

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

I think you might be basing this on an out of date branch. Rebase atop master as these changes should not be removing those tests.

@sehrope
Copy link
Member

sehrope commented Jul 6, 2021

I did a quick review of this PR. Some changes requested. I also enabled the CI to build. You should be able to run all of this locally too.

@davecramer
Copy link
Member

@mgrobaker I would love to merge this but we need some changes made. Are you able to take care of this ?

@davecramer davecramer merged commit 7d2a21e into pgjdbc:master Nov 12, 2021
@mgrobaker
Copy link
Contributor Author

@davecramer thank you for finishing this for me - sorry I hadn't responded to the original review

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.

Add additional tests for getTablePrivileges() for materialized views and foreign tables
3 participants