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

fix: return metadata privileges for views and foreign tables #2049

Closed
wants to merge 3 commits into from

Conversation

jeremymailen
Copy link
Contributor

As discussed in the issue, include the overlooked types as part of the metadata impl.
Securable objects which are returned by getTables() should also work in getTablePrivileges().

Fixes #2048

@sehrope
Copy link
Member

sehrope commented Feb 4, 2021

The fix seems simple enough. Would be nice to have a test for foreign tables as well but there's a bunch of scaffolding required for that so I think it's fine to add that in a follow up.

The rest of the test related changes and clean up should be in their own commit.

@jeremymailen
Copy link
Contributor Author

The fix seems simple enough. Would be nice to have a test for foreign tables as well but there's a bunch of scaffolding required for that so I think it's fine to add that in a follow up.

The rest of the test related changes and clean up should be in their own commit.

Thank you for the quick review. Will separate the commits.
Agree on the test. Comprehensive would be nice, but seemed heavy compared to the existing tests.

As discussed in the issue, include the overlooked types as part of the metadata impl.
Securable objects which are returned by getTables() should also work in getTablePrivileges().

Fixes pgjdbc#2048
@sehrope
Copy link
Member

sehrope commented Feb 13, 2021

@jeremymailen I reworded things a bit, changed the view helper to supply a query rather than column list and table name (more versatile), and this has been merged into master. I'll get it cherry picked into the release branch too so it's part of the upcoming release. Thanks for the contribution.

@sehrope sehrope closed this Feb 13, 2021
@jeremymailen
Copy link
Contributor Author

thank you sir

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.

PgDatabaseMetaData getTablePrivileges does not return permissions for views
2 participants