Show view definition
This commit is contained in:
parent
dc949f3c34
commit
ead3ce8a8a
3 changed files with 26 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ std::string PgClassContainer::getLoadQuery() const
|
|||
" relowner, relam, relfilenode, reltablespace, relpages, "
|
||||
" reltuples, reltoastrelid, relisshared, relpersistence, "
|
||||
" relkind, relispopulated, relfrozenxid, relminmxid, "
|
||||
" reloptions, relacl";
|
||||
" reloptions, relacl, pg_get_viewdef(oid)";
|
||||
|
||||
if (lessThenVersion(120000))
|
||||
q += ", relhasoids ";
|
||||
|
|
@ -45,6 +45,10 @@ PgClass PgClassContainer::loadElem(const Pgsql::Row &row)
|
|||
col >> acl_list;
|
||||
v.setAcls(std::move(acl_list));
|
||||
|
||||
auto vd = col.nextValue();
|
||||
if (!vd.null())
|
||||
v.viewdef = vd.asQString();
|
||||
|
||||
if (lessThenVersion(120000))
|
||||
col >> v.hasoids;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue