Permalink
Browse files

Fix handling of Greenplum partitions.

  • Loading branch information...
1 parent 4a864a6 commit 8c09a7e6c96505c14a6ed3ee2fdd72907ce97fd2 @lppetrov lppetrov committed with dpage Jan 18, 2013
Showing with 31 additions and 8 deletions.
  1. +1 −0 CHANGELOG
  2. +2 −0 pgadmin/include/schema/pgTable.h
  3. +28 −8 pgadmin/schema/pgTable.cpp
View
@@ -37,6 +37,7 @@ Changes
Date Dev Ver Change details
---------- --- ------ --------------
+2013-01-18 DP 1.16.2 Fix handling of Greenplum partitions [Lubomir Petrov]
2013-01-06 GL 1.18.0 Add -V/--version CLI option.
2013-01-06 GL 1.18.0 Add actions menu to the serverstatus tool.
2013-01-06 GL 1.16.2 Fix the database SQL when reseting a configuration
@@ -534,6 +534,8 @@ class pgTable : public pgSchemaObject
void AppendStuff(wxString &sql, ctlTree *browser, pgaFactory &factory);
void AppendStuffNoSql(wxString &sql, ctlTree *browser, pgaFactory &factory);
+ void Init();
+
wxULongLong rows;
double estimatedRows;
View
@@ -34,26 +34,46 @@
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();
}
pgTable::~pgTable()
{
}
+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;
+}
+
+
wxString pgTable::GetTranslatedMessage(int kindOfMessage) const
{
wxString message = wxEmptyString;

0 comments on commit 8c09a7e

Please sign in to comment.