diff --git a/Release_(3.0)/pgAdmin3.exe b/Release_(3.0)/pgAdmin3.exe index 0b01b05..1756d15 100644 Binary files a/Release_(3.0)/pgAdmin3.exe and b/Release_(3.0)/pgAdmin3.exe differ diff --git a/ctl/ctlSQLGrid.cpp b/ctl/ctlSQLGrid.cpp index 4e23832..098288f 100644 --- a/ctl/ctlSQLGrid.cpp +++ b/ctl/ctlSQLGrid.cpp @@ -590,7 +590,7 @@ int recurse(ctlSQLGrid *g, int pos,int row, double &transfer) { // посчитаем время работы узла double m=1; // -> Nested Loop (cost=205.13..273.44 rows=4 width=188) (actual time=13.157..13.157 rows=0 loops=1) - wxRegEx foundstr(wxT("actual time=.*?\\.\\.([0-9.]+).*?loops=([0-9]+)"),wxRE_ADVANCED); + wxRegEx foundstr(wxT("actual time=.*?\\.\\.([0-9.]+).*?loops=([0-9]+)\\)"),wxRE_ADVANCED); if (foundstr.Matches(text)) { wxString v=foundstr.GetMatch(text,1); v.ToCDouble(&lastnode); @@ -621,7 +621,7 @@ int recurse(ctlSQLGrid *g, int pos,int row, double &transfer) { // //leveltime=leveltime+transfer; //GroupRows *u=g->getgroup(); - int tt=lastnode-transfer; + double tt=lastnode-transfer; text = g->GetCellValue(row-1, 0); if ((text.Find("Append")>0) ||(text.Find("Gather")>0)) diff --git a/ctl/ctlSQLResult.cpp b/ctl/ctlSQLResult.cpp index 157b289..e122faf 100644 --- a/ctl/ctlSQLResult.cpp +++ b/ctl/ctlSQLResult.cpp @@ -94,6 +94,8 @@ bool ctlSQLResult::ToFile(frmExport *frm) return false; } + + bool ctlSQLResult::IsColText(int col) { switch (colTypClasses.Item(col)) @@ -124,7 +126,6 @@ int ctlSQLResult::Execute(const wxString &query, int resultToRetrieve, wxWindow colNames.Empty(); colTypes.Empty(); colTypClasses.Empty(); - thread = new pgQueryThread(conn, query, resultToRetrieve, caller, eventId, data); if (thread->Create() != wxTHREAD_NO_ERROR) @@ -202,17 +203,19 @@ void ctlSQLResult::DisplayData(bool single) } } + table->isplan=false; + wxString c=thread->DataSet()->ColName(0); + if (c==wxT("QUERY PLAN")) { + // + table->isplan=true; + FullArrayCollapseRowsPlan(); + }; + if (single) { colNames.Add(thread->DataSet()->ColName(0)); colTypes.Add(wxT("")); colTypClasses.Add(0L); - wxString c=thread->DataSet()->ColName(0); - if (c==wxT("QUERY PLAN")) { - // - isplan=true; - FullArrayCollapseRowsPlan(); - } else isplan=false; AutoSizeColumn(0, false, false); } @@ -473,6 +476,21 @@ int sqlResultTable::GetNumberRows() return 0; } +wxString sqlResultTable::GetRowLabelValue( int row ) +{ + if ( isplan ) + { + // using default label + // + return wxGridStringTable::GetRowLabelValue(row); + } + else + { + wxString s; + s << row + 1; + return s; + } +} wxString sqlResultTable::GetColLabelValue(int col) { diff --git a/include/ctl/ctlSQLResult.h b/include/ctl/ctlSQLResult.h index 08c42b5..6535d37 100644 --- a/include/ctl/ctlSQLResult.h +++ b/include/ctl/ctlSQLResult.h @@ -77,7 +77,6 @@ private: pgQueryThread *thread; pgConn *conn; bool rowcountSuppressed; - bool isplan; }; class sqlResultTable : public wxGridStringTable//wxGridTableBase @@ -85,8 +84,10 @@ class sqlResultTable : public wxGridStringTable//wxGridTableBase public: sqlResultTable(); wxString GetValue(int row, int col); + wxString GetRowLabelValue( int row ) ; int GetNumberRows(); int GetNumberCols(); + bool isplan; bool IsEmptyCell(int row, int col) { return false; @@ -108,7 +109,7 @@ public: { return true; } - + private: pgQueryThread *thread; };