correct bugs

This commit is contained in:
levinsv 2019-05-29 22:17:21 +05:00
parent 4760f322cd
commit 1a7d00f1f4
4 changed files with 15 additions and 4 deletions

Binary file not shown.

View file

@ -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);

View file

@ -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)
{

View file

@ -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];