comments on tables
Show them in the list of tables. Genereate SQL to set the comment.
This commit is contained in:
parent
7fbc828326
commit
9d58af8cd2
5 changed files with 34 additions and 18 deletions
|
|
@ -49,6 +49,8 @@ public:
|
|||
std::vector<QString> options;
|
||||
QString viewdef;
|
||||
|
||||
QString description; // from pg_description
|
||||
|
||||
using PgNamespaceObject::PgNamespaceObject;
|
||||
|
||||
QString kindString() const;
|
||||
|
|
|
|||
|
|
@ -11,13 +11,14 @@ std::string PgClassContainer::getLoadQuery() const
|
|||
" relowner, relam, relfilenode, reltablespace, relpages, "
|
||||
" reltuples, reltoastrelid, relisshared, relpersistence, "
|
||||
" relkind, relispopulated, relfrozenxid, relminmxid, "
|
||||
" reloptions, relacl, pg_get_viewdef(oid)";
|
||||
" reloptions, d.description, relacl, pg_get_viewdef(oid)";
|
||||
|
||||
if (lessThenVersion(120000))
|
||||
q += ", relhasoids ";
|
||||
|
||||
q +=
|
||||
"\nFROM pg_catalog.pg_class \n"
|
||||
" LEFT JOIN pg_catalog.pg_description AS d ON (objoid=pg_class.oid AND objsubid=0) \n"
|
||||
"WHERE relkind IN ('r', 'i', 'p', 'I', 'v', 'm', 'f')";
|
||||
|
||||
return q;
|
||||
|
|
@ -35,8 +36,8 @@ PgClass PgClassContainer::loadElem(const Pgsql::Row &row)
|
|||
col >> v.type >> v.oftype
|
||||
>> owner >> v.am >> v.filenode >> v.tablespace >> v.pages_est
|
||||
>> v.tuples_est >> v.toastrelid >> v.isshared >> v.persistence
|
||||
>> v.kind >> v.ispopulated >> v.frozenxid >> v.minmxid
|
||||
>> v.options;
|
||||
>> v.kind >> v.ispopulated >> v.frozenxid >> v.minmxid
|
||||
>> v.options >> v.description;
|
||||
|
||||
|
||||
v.setOwnerOid(owner);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue