Postgres - generated DDL always includes permissions/owner
Answered
I recently started using DataGrip, and wanted to know if there is a way to disable the generation of the ownership lines when generating DDL?
Every time I generate a DDL via 'Right click (on object from db explorer)' > 'SQL Scripts' > 'Generate DDL to Clipboard' the resulting script appends the following.
alter table example_table
owner to example_user;
I've used DBeaver and it doesn't add ownership to the definition of the table/view/procedure.
I found this issue on YouTrack and apparently the option is available on version 2022.1, but now I am in 2022.3 and cannot find the feature.
Is there a way to customize this?
Please sign in to leave a comment.
Hello,
Could you please provide screenshot from "right click -> SQL Scripts -> SQL Generator"?
Thank you, I was stuck using "right click -> SQL Scripts -> Generate DDL to Clipboard/Query Console"
The result of "right click -> SQL Scripts -> SQL Generator" is what I needed with many more options for customization:
Picking "Ignore owner" solved my question, thank you so much.
You are welcome! Feel free to contact us if you need any assistance.