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

[PostgreSQL] Display privileges and default privileges in schema DDL #6565

Closed
rbovard opened this issue Aug 20, 2019 · 3 comments
Closed

[PostgreSQL] Display privileges and default privileges in schema DDL #6565

rbovard opened this issue Aug 20, 2019 · 3 comments
Assignees
Milestone

Comments

@rbovard
Copy link

@rbovard rbovard commented Aug 20, 2019

Hello,

Working on PostgreSQL schemas with DBeaver 6.1.4, I noticed that in the generated DDL for schemas the privileges and default privileges are not displayed.

pgAdmin

CREATE SCHEMA <schema> AUTHORIZATION <admin>;

GRANT ALL ON SCHEMA <schema> TO <admin>;
GRANT ALL ON SCHEMA <schema> TO <role_1>;
GRANT USAGE ON SCHEMA <schema> TO <role_2>;

ALTER DEFAULT PRIVILEGES IN SCHEMA <schema>
    GRANT INSERT, SELECT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON TABLES
    TO <role_1>;

ALTER DEFAULT PRIVILEGES IN SCHEMA <schema>
    GRANT SELECT ON TABLES
    TO <role_2>;

ALTER DEFAULT PRIVILEGES IN SCHEMA <schema>
    GRANT SELECT, UPDATE, USAGE ON SEQUENCES
    TO <role_1>;

ALTER DEFAULT PRIVILEGES IN SCHEMA <schema>
    GRANT SELECT, UPDATE, USAGE ON SEQUENCES
    TO <role_2>;

ALTER DEFAULT PRIVILEGES IN SCHEMA <schema>
    GRANT EXECUTE ON FUNCTIONS
    TO <role_1>;

ALTER DEFAULT PRIVILEGES IN SCHEMA <schema>
    GRANT EXECUTE ON FUNCTIONS
    TO <role_2>;

ALTER DEFAULT PRIVILEGES IN SCHEMA <schema>
    GRANT USAGE ON TYPES
    TO <role_1>;

ALTER DEFAULT PRIVILEGES IN SCHEMA <schema>
    GRANT USAGE ON TYPES
    TO <role_2>;

DBeaver 6.1.4

CREATE SCHEMA <schema> AUTHORIZATION <admin>;

As I can see, the missing statements are:

  • GRANT <what> ON SCHEMA <schema> TO <who>;
  • ALTER DEFAULT PRIVILEGES IN SCHEMA <schema> GRANT <what-s> ON TABLES TO <who>;

Is it possible to add these informations?

Thanks for your great work.

@rbovard rbovard changed the title [PostGIS] Display privileges and default privileges in schema DDL [PostgreSQL] Display privileges and default privileges in schema DDL Aug 20, 2019
@nledenyi

This comment has been minimized.

Copy link

@nledenyi nledenyi commented Aug 27, 2019

I also noticed the same some time back, however for Greenplum and not native Postgres. Would love to see it added so I can finally ditch pgadmin for good

serge-rider added a commit that referenced this issue Feb 14, 2020
serge-rider added a commit that referenced this issue Feb 14, 2020
@serge-rider serge-rider added this to Backlog in DBeaver board via automation Feb 14, 2020
@serge-rider serge-rider added this to the 6.3.5 milestone Feb 14, 2020
@serge-rider serge-rider moved this from Backlog to Ready for QA in DBeaver board Feb 14, 2020
@serge-rider

This comment has been minimized.

Copy link
Member

@serge-rider serge-rider commented Feb 14, 2020

Done.
As addition to #7266

@uslss uslss self-assigned this Feb 14, 2020
@uslss

This comment has been minimized.

Copy link
Collaborator

@uslss uslss commented Feb 14, 2020

verified

@uslss uslss closed this Feb 14, 2020
DBeaver board automation moved this from Ready for QA to Done Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
DBeaver board
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.