Toad World® Forums

How to specify GRANT/privileges before generating DDL

version 4.1.5.8
target: postgres 9.0

Just downloaded TDM and have created a couple of tables in a model. I’ve generated the DDL once, but noticed there are no GRANT statements associated with the objects…

In short, I would like to set GRANT privileges on tables (or other objects) before forward engineering to DDL. Is this possible? If so, I would appreciate pointers to docs that explain how to specify privileges and logins prior to generating the DDL… thanks

My first thought was that the option to specify object perms (GRANT for starters) would magically appear if I defined some users… so…

According to the user guide, I should be able to add users from a couple of different vantage points… either select graphic/icon from the USERS tool bar or select USERS from the MODEL menu item.

Neither the icon nor the menu item exists…

I see USER GROUPS, but there are no users yet defined to add to the group…

Thanks in advance!
Mark

Hi,

you can specify User Groups in PostgreSQL model and when you generate SQL code CREATE ROLE statements will be generated. According to PostgreSQL documentation, CREATE USER is an alias to CREATE ROLE. That’s the reason why User object is not available in PostgreSQL models.

PostgreSQL documentation:
http://www.postgresql.org/docs/9.1/static/sql-createuser.html

Click tab Permissions on selected object properties dialog and define grants there. See attached screenshot.

Re documentation: TDM supports various database platforms and what you can find in Oracle database, for example, doesn’t exist in PostgreSQL. It would be difficult to write documentation for all target database platforms, that’s why the documentation shows some options for Oracle. Thank you for understanding it.

Regards,

Vaclav
grants-postgresql.png