SVN Commit by dpage: r4420 - trunk/pgadmin3/src/schema - Mailing list pgadmin-hackers

From svn@pgadmin.org
Subject SVN Commit by dpage: r4420 - trunk/pgadmin3/src/schema
Date
Msg-id 200508282018.j7SKIVaB007912@developer.pgadmin.org
Whole thread Raw
List pgadmin-hackers
Author: dpage
Date: 2005-08-28 21:18:31 +0100 (Sun, 28 Aug 2005)
New Revision: 4420

Modified:
   trunk/pgadmin3/src/schema/pgDatabase.cpp
   trunk/pgadmin3/src/schema/pgIndex.cpp
   trunk/pgadmin3/src/schema/pgTable.cpp
   trunk/pgadmin3/src/schema/pgTablespace.cpp
Log:
Back out previous pointless patch. Engage brain Dave...

Modified: trunk/pgadmin3/src/schema/pgDatabase.cpp
===================================================================
--- trunk/pgadmin3/src/schema/pgDatabase.cpp    2005-08-28 20:10:08 UTC (rev 4419)
+++ trunk/pgadmin3/src/schema/pgDatabase.cpp    2005-08-28 20:18:31 UTC (rev 4420)
@@ -480,8 +480,7 @@
 {
     wxLogInfo(wxT("Displaying statistics for databases on ") + GetServer()->GetIdentifier());

-    // 8.1 has the database size functions built in.
-    bool hasSize=(GetConnection()->HasFeature(FEATURE_SIZE) || GetConnection()->BackendMinimumVersion(8, 1));
+    bool hasSize=GetConnection()->HasFeature(FEATURE_SIZE);

     wxString sql=wxT("SELECT datname, numbackends, xact_commit, xact_rollback, blks_read, blks_hit");


Modified: trunk/pgadmin3/src/schema/pgIndex.cpp
===================================================================
--- trunk/pgadmin3/src/schema/pgIndex.cpp    2005-08-28 20:10:08 UTC (rev 4419)
+++ trunk/pgadmin3/src/schema/pgIndex.cpp    2005-08-28 20:18:31 UTC (rev 4420)
@@ -215,8 +215,7 @@

 void pgIndexBase::ShowStatistics(frmMain *form, ctlListView *statistics)
 {
-    // 8.1 has the database size functions built in.
-    if (GetConnection()->HasFeature(FEATURE_SIZE) || GetConnection()->BackendMinimumVersion(8, 1))
+    if (GetConnection()->HasFeature(FEATURE_SIZE))
         DisplayStatistics(statistics,
             wxT("SELECT pg_size_pretty(pg_relation_size(") + GetOidStr() + wxT(")) AS ") + qtIdent(_("Index Size")));
 }

Modified: trunk/pgadmin3/src/schema/pgTable.cpp
===================================================================
--- trunk/pgadmin3/src/schema/pgTable.cpp    2005-08-28 20:10:08 UTC (rev 4419)
+++ trunk/pgadmin3/src/schema/pgTable.cpp    2005-08-28 20:18:31 UTC (rev 4420)
@@ -480,8 +480,7 @@
 {
     wxLogInfo(wxT("Displaying statistics for tables on ")+ GetSchema()->GetIdentifier());

-    // 8.1 has the database size functions built in.
-    bool hasSize=(GetConnection()->HasFeature(FEATURE_SIZE) || GetConnection()->BackendMinimumVersion(8, 1));
+    bool hasSize=GetConnection()->HasFeature(FEATURE_SIZE);

     // Add the statistics view columns
     statistics->ClearAll();
@@ -546,8 +545,8 @@
              wxT(", toast_blks_hit AS ") + qtIdent(_("Toast Blocks Hit")) +
              wxT(", tidx_blks_read AS ") + qtIdent(_("Toast Index Blocks Read")) +
              wxT(", tidx_blks_hit AS ") + qtIdent(_("Toast Index Blocks Hit"));
-
-    if (GetConnection()->HasFeature(FEATURE_SIZE) || GetConnection()->BackendMinimumVersion(8, 1))
+
+    if (GetConnection()->HasFeature(FEATURE_SIZE))
     {
         sql += wxT(", pg_size_pretty(pg_relation_size(stat.relid)) AS ") + qtIdent(_("Table Size"))
             +  wxT(", CASE WHEN cl.reltoastrelid = 0 THEN ") + qtString(_("none")) + wxT(" ELSE
pg_size_pretty(pg_relation_size(cl.reltoastrelid)+COALESCE((SELECT SUM(pg_relation_size(indexrelid)) FROM pg_index
WHEREindrelid=cl.reltoastrelid)::int8, 0)) END AS ") + qtIdent(_("Toast Table Size")) 

Modified: trunk/pgadmin3/src/schema/pgTablespace.cpp
===================================================================
--- trunk/pgadmin3/src/schema/pgTablespace.cpp    2005-08-28 20:10:08 UTC (rev 4419)
+++ trunk/pgadmin3/src/schema/pgTablespace.cpp    2005-08-28 20:18:31 UTC (rev 4420)
@@ -133,7 +133,7 @@
 {
     if (statistics)
     {
-        if (GetConnection()->HasFeature(FEATURE_SIZE) || GetConnection()->BackendMinimumVersion(8, 1))
+        if (GetConnection()->HasFeature(FEATURE_SIZE))
         {
             wxLogInfo(wxT("Displaying statistics for %s"), GetTypeName().c_str());

@@ -220,7 +220,7 @@

 void pgTablespaceCollection::ShowStatistics(frmMain *form, ctlListView *statistics)
 {
-    if (GetConnection()->HasFeature(FEATURE_SIZE) || GetConnection()->BackendMinimumVersion(8, 1))
+    if (GetConnection()->HasFeature(FEATURE_SIZE))
     {
         wxLogInfo(wxT("Displaying statistics for tablespaces"));



pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r4419 - trunk/pgadmin3/src/schema
Next
From: Andreas Pflug
Date:
Subject: pgsql 8.1 instrumentation status