The SQL tab for a table now also shares the grant/revoke statements for that table (but not yet any column level grants).
This commit is contained in:
parent
93687df959
commit
4ec4e02411
3 changed files with 12 additions and 0 deletions
|
|
@ -267,6 +267,7 @@ void TablesPage::updateSqlTab(const std::optional<PgClass> &table)
|
|||
|
||||
// Privileges
|
||||
create_sql += "-- set Privileges\n";
|
||||
create_sql += table->grantSql();
|
||||
|
||||
// Comments
|
||||
create_sql += "-- set Comments table + columns\n";
|
||||
|
|
|
|||
|
|
@ -88,6 +88,16 @@ QString PgClass::typeName() const
|
|||
throw std::runtime_error("Unexpected value in PgClass::typeName()");
|
||||
}
|
||||
|
||||
QString PgClass::aclAllPattern() const
|
||||
{
|
||||
switch (kind) {
|
||||
case RelKind::Table: return "arwdDxt";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
QString PgClass::createTableSql() const
|
||||
{
|
||||
QString sql;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public:
|
|||
|
||||
QString createSql() const;
|
||||
QString typeName() const override;
|
||||
QString aclAllPattern() const override;
|
||||
|
||||
private:
|
||||
mutable QString createSqlCache;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue