Log Message: ----------- fix "no schema" bug when database is initial database
Modified Files: -------------- pgadmin3: CHANGELOG.txt (r1.105 -> r1.106) pgadmin3/src/ui: frmStatus.cpp (r1.22 -> r1.23) pgadmin3/src/schema: pgDatabase.cpp (r1.55 -> r1.56)
Index: CHANGELOG.txt =================================================================== RCS file: /projects/pgadmin3/CHANGELOG.txt,v retrieving revision 1.105 retrieving revision 1.106 diff -LCHANGELOG.txt -LCHANGELOG.txt -u -w -r1.105 -r1.106 --- CHANGELOG.txt +++ CHANGELOG.txt @@ -16,7 +16,8 @@ </ul> <br> <ul> - <li>2004.06.11 AP Apply for some function and view property dialogs + <li>2004-06-13 AP fix "no schema" bug when database is initial database + <li>2004-06-11 AP Apply for some function and view property dialogs <li>2004-06-11 AP Display server log <li>2004-06-08 AP Allow Server Status & Maintenance windows to be resized to allow easy reading of data <li>2004-06-07 AP changed connection loss handling Index: frmStatus.cpp =================================================================== RCS file: /projects/pgadmin3/src/ui/frmStatus.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -Lsrc/ui/frmStatus.cpp -Lsrc/ui/frmStatus.cpp -u -w -r1.22 -r1.23 --- src/ui/frmStatus.cpp +++ src/ui/frmStatus.cpp @@ -205,6 +205,7 @@ pgSet *dataSet1=connection->ExecuteSet(wxT("SELECT * FROM pg_stat_activity ORDER BY procpid")); if (dataSet1) { + statusList->Freeze(); while (!dataSet1->Eof()) { pid=dataSet1->GetLong(wxT("procpid")); @@ -248,7 +249,7 @@ dataSet1->MoveNext(); } delete dataSet1; - lockList->Thaw(); + statusList->Thaw(); } else connection->IsAlive(); @@ -361,7 +362,7 @@ } else { - long newlen = StrToLong(connection->ExecuteScalar(wxT("SELECT pg_logfile_length()"))); + long newlen = StrToLong(connection->ExecuteScalar(wxT("SELECT pg_logfile_length(NULL)"))); wxString line; bool skipFirst=false; @@ -375,7 +376,7 @@ while (newlen > logFileLength) { - pgSet *set=connection->ExecuteSet(wxT("SELECT pg_logfile(NULL, ") + NumToStr(logFileLength) + wxT(")")); + pgSet *set=connection->ExecuteSet(wxT("SELECT pg_logfile_get(NULL, ") + NumToStr(logFileLength) + wxT(", NULL)")); if (!set) { connection->IsAlive(); Index: pgDatabase.cpp =================================================================== RCS file: /projects/pgadmin3/src/schema/pgDatabase.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -Lsrc/schema/pgDatabase.cpp -Lsrc/schema/pgDatabase.cpp -u -w -r1.55 -r1.56 --- src/schema/pgDatabase.cpp +++ src/schema/pgDatabase.cpp @@ -38,11 +38,7 @@ pgDatabase::~pgDatabase() { wxLogInfo(wxT("Destroying a pgDatabase object")); - if (conn) - { - if (conn) - delete conn; - } + Disconnect(); } @@ -129,7 +125,7 @@ pgSet *pgDatabase::ExecuteSet(const wxString& sql) { pgSet *set=0; - if (conn) + if (connection()) { set=connection()->ExecuteSet(sql); if (!set) @@ -142,7 +138,7 @@ wxString pgDatabase::ExecuteScalar(const wxString& sql) { wxString str; - if (conn) + if (connection()) { str = connection()->ExecuteScalar(sql); if (str.IsEmpty() && connection()->GetLastResultStatus() != PGRES_TUPLES_OK) @@ -155,7 +151,7 @@ bool pgDatabase::ExecuteVoid(const wxString& sql) { bool rc; - if (conn) + if (connection()) { rc = connection()->ExecuteVoid(sql); if (!rc)
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])