Skip to content
Permalink
Browse files

#6565 PG schema DDL (add user permissions)

  • Loading branch information
serge-rider committed Feb 14, 2020
1 parent e7543ea commit 898429827f0d389c0ad35bb121156337c74e04cc
@@ -23,6 +23,7 @@
import org.jkiss.dbeaver.ext.postgresql.PostgreConstants;
import org.jkiss.dbeaver.ext.postgresql.PostgreUtils;
import org.jkiss.dbeaver.model.*;
import org.jkiss.dbeaver.model.edit.DBEPersistAction;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
@@ -448,6 +449,14 @@ public String getObjectDefinitionText(DBRProgressMonitor monitor, Map<String, Ob
}
}

List<DBEPersistAction> actions = new ArrayList<>();
PostgreUtils.getObjectGrantPermissionActions(monitor, this, actions, options);
if (!actions.isEmpty()) {
sql.append("\n\n");
sql.append(SQLUtils.generateScript(getDataSource(), actions.toArray(new DBEPersistAction[0]), false));
}


return sql.toString();
}

0 comments on commit 8984298

Please sign in to comment.
You can’t perform that action at this time.