diff --git a/pgadmin/include/schema/pgTable.h b/pgadmin/include/schema/pgTable.h index 2108e41..77064d8 100644 --- a/pgadmin/include/schema/pgTable.h +++ b/pgadmin/include/schema/pgTable.h @@ -534,6 +534,8 @@ private: void AppendStuff(wxString &sql, ctlTree *browser, pgaFactory &factory); void AppendStuffNoSql(wxString &sql, ctlTree *browser, pgaFactory &factory); + void Init(); + wxULongLong rows; double estimatedRows; diff --git a/pgadmin/schema/pgTable.cpp b/pgadmin/schema/pgTable.cpp index 4f7b770..0aee376 100644 --- a/pgadmin/schema/pgTable.cpp +++ b/pgadmin/schema/pgTable.cpp @@ -34,19 +34,31 @@ pgTable::pgTable(pgSchema *newSchema, const wxString &newName) : pgSchemaObject(newSchema, tableFactory, newName) { - inheritedTableCount = 0; - rowsCounted = false; - showExtendedStatistics = false; - distributionIsRandom = false; + Init(); } pgTable::pgTable(pgSchema *newSchema, pgaFactory &newFactory, const wxString &newName) : pgSchemaObject(newSchema, newFactory, newName) { - inheritedTableCount = 0; - rowsCounted = false; - showExtendedStatistics = false; - distributionIsRandom = false; + Init(); +} + +void pgTable::Init() +{ + rows = 0; + estimatedRows = 0.0; + + hasToastTable = false; + autovacuum_enabled = 0; toast_autovacuum_enabled = 0; + + isPartitioned = false; + hasOids = false; unlogged = false; hasSubclass = false; rowsCounted = false; + isReplicated = false; showExtendedStatistics = false; distributionIsRandom = false; + + inheritedTableCount = 0; triggerCount = 0; + + tablespaceOid = 0; + ofTypeOid = 0; } pgTable::~pgTable()