diff --git a/pglab/TablesPage.cpp b/pglab/TablesPage.cpp index 9fe47b7..1e31415 100644 --- a/pglab/TablesPage.cpp +++ b/pglab/TablesPage.cpp @@ -267,6 +267,7 @@ void TablesPage::updateSqlTab(const std::optional &table) // Privileges create_sql += "-- set Privileges\n"; + create_sql += table->grantSql(); // Comments create_sql += "-- set Comments table + columns\n"; diff --git a/pglablib/catalog/PgClass.cpp b/pglablib/catalog/PgClass.cpp index 2415bee..3ae416b 100644 --- a/pglablib/catalog/PgClass.cpp +++ b/pglablib/catalog/PgClass.cpp @@ -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; diff --git a/pglablib/catalog/PgClass.h b/pglablib/catalog/PgClass.h index 8fa9be3..3e67e29 100644 --- a/pglablib/catalog/PgClass.h +++ b/pglablib/catalog/PgClass.h @@ -65,6 +65,7 @@ public: QString createSql() const; QString typeName() const override; + QString aclAllPattern() const override; private: mutable QString createSqlCache;