-
Notifications
You must be signed in to change notification settings - Fork 834
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
Conversation
pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
Outdated
Show resolved
Hide resolved
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. |
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
ca061ed
to
2973fa1
Compare
@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. |
thank you sir |
Redshift experiences the same issue filed here pgjdbc/pgjdbc#2048 and fixed here pgjdbc/pgjdbc#2049 as part of release 42.2.19. Essentially the query to get the access privileges for table-like objects is missing some of the types.
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 ingetTablePrivileges()
.Fixes #2048