diff --git a/Release_(3.0)/pgAdmin3.exe b/Release_(3.0)/pgAdmin3.exe index c842943..844d48a 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 70a15c1..731e784 100644 --- a/ctl/ctlSQLGrid.cpp +++ b/ctl/ctlSQLGrid.cpp @@ -151,7 +151,8 @@ wxString ctlSQLGrid::GetExportLine(int row, wxArrayInt cols) else if (settings->GetCopyQuoting() == 2) /* Quote everything */ needQuote = true; - if (text.Length()==0&&generatesql) {needQuote = false;} + if (text.Length()==0&&generatesql) {needQuote = false;} else + if (generatesql) needQuote = IsColText(cols[col]); if (needQuote) str.Append(qtsimbol); diff --git a/frm/frmStatus.cpp b/frm/frmStatus.cpp index d64a719..24f0f76 100644 --- a/frm/frmStatus.cpp +++ b/frm/frmStatus.cpp @@ -59,7 +59,6 @@ BEGIN_EVENT_TABLE(frmStatus, pgFrame) EVT_MENU(MNU_COPY, frmStatus::OnCopy) EVT_MENU(MNU_COPY_QUERY, frmStatus::OnCopyQuery) - EVT_MENU(MNU_HELP, frmStatus::OnHelp) EVT_MENU(MNU_CONTENTS, frmStatus::OnContents) EVT_MENU(MNU_STATUSPAGE, frmStatus::OnToggleStatusPane) @@ -1147,8 +1146,18 @@ void frmStatus::OnCopy(wxCommandEvent &ev) break; } if (currentPane==PANE_QUERYSTATE) { + wxString s; for (row = 0; row < list->GetItemCount(); row++) { + s=list->GetText(row, 2); + if (s.Length()>0) { + text.Append(wxT("SQL QUERY: ")).Append(s); + #ifdef __WXMSW__ + text.Append(wxT("\r\n")); + #else + text.Append(wxT("\n")); + #endif + } text.Append(list->GetText(row, 3)); #ifdef __WXMSW__ text.Append(wxT("\r\n")); @@ -2065,7 +2074,7 @@ void frmStatus::OnRefreshQuerystateTimer(wxTimerEvent &event) wxString sql; sql = wxT("select pid,frame_number,query_text,unnest(string_to_array(plan, E'\n')) pln,leader_pid from pg_query_state(") +pid+flags+wxT(") s"); - + pgSet *dataSet3 = connection->ExecuteSet(sql,false); if (dataSet3) { diff --git a/include/frm/frmStatus.h b/include/frm/frmStatus.h index 9ce32c3..d0dc020 100644 --- a/include/frm/frmStatus.h +++ b/include/frm/frmStatus.h @@ -50,6 +50,7 @@ enum MNU_COMMIT, MNU_ROLLBACK, MNU_COPY_QUERY, + MNU_COPY_QUERY_PLAN, MNU_HIGHLIGHTSTATUS, MNU_QUERYSTATEVERBOSE, MNU_QUERYSTATETIME, @@ -154,7 +155,7 @@ private: wxMenu *lockPopupMenu; wxMenu *xactPopupMenu; wxMenu *querystatePopupMenu; - + wxString queryplan; wxArrayString queries; int statusColWidth[12], lockColWidth[10], xactColWidth[5], querystateColWidth[5];