parent
9c9e78c54b
commit
bdef76ed8a
2 changed files with 6 additions and 6 deletions
|
|
@ -7,15 +7,15 @@
|
|||
|
||||
std::string PgClassContainer::getLoadQuery() const
|
||||
{
|
||||
std::string q = "SELECT oid, relname, relnamespace, reltype, reloftype, "
|
||||
std::string q = "SELECT pg_class.oid, relname, relnamespace, reltype, reloftype, "
|
||||
" relowner, relam, relfilenode, reltablespace, relpages, "
|
||||
" reltuples, reltoastrelid, relisshared, relpersistence, "
|
||||
" relkind, relispopulated, relfrozenxid, relminmxid, "
|
||||
" reloptions, d.description, "
|
||||
" pg_total_relation_size(oid) AS total_bytes, "
|
||||
" CASE WHEN relkind='r' THEN pg_indexes_size(oid) ELSE 0 END AS index_bytes, "
|
||||
" pg_total_relation_size(pg_class.oid) AS total_bytes, "
|
||||
" CASE WHEN relkind='r' THEN pg_indexes_size(pg_class.oid) ELSE 0 END AS index_bytes, "
|
||||
" CASE WHEN relkind='r' THEN pg_total_relation_size(reltoastrelid) ELSE 0 END AS toast_bytes, "
|
||||
" relacl, pg_get_viewdef(oid)";
|
||||
" relacl, pg_get_viewdef(pg_class.oid)";
|
||||
|
||||
if (lessThenVersion(120000))
|
||||
q += ", relhasoids ";
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
std::string PgDatabaseContainer::getLoadQuery() const
|
||||
{
|
||||
return
|
||||
"SELECT oid, datname, datdba, encoding, pg_encoding_to_char(encoding), datcollate,\n"
|
||||
" datctype, datistemplate, datallowconn, datconnlimit, dattablespace, pg_database_size(oid),\n"
|
||||
"SELECT pg_database.oid, datname, datdba, encoding, pg_encoding_to_char(encoding), datcollate,\n"
|
||||
" datctype, datistemplate, datallowconn, datconnlimit, dattablespace, pg_database_size(pg_database.oid),\n"
|
||||
" d.description, datacl\n"
|
||||
"FROM pg_database\n"
|
||||
" LEFT JOIN pg_catalog.pg_shdescription AS d ON (objoid=pg_database.oid)";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue