From 71f05e1f82582ea69fd24c4bc6a2aee4e167992a Mon Sep 17 00:00:00 2001 From: lsv Date: Thu, 11 Jun 2026 09:30:37 +0500 Subject: [PATCH] fix compile Microsoft VS. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Оптимизация для linux конфликтует с компиляцией на VS. Добавлено усиление проверки версии БД. --- db/pgConn.cpp | 4 +++- frm/frmDatabaseDesigner.cpp | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/db/pgConn.cpp b/db/pgConn.cpp index e3e72f3..e1602be 100644 --- a/db/pgConn.cpp +++ b/db/pgConn.cpp @@ -510,7 +510,9 @@ bool pgConn::BackendMinimumVersion(int major, int minor) } isPgProEnt=false; wxString ed=ExecuteScalar(wxT("select to_regproc('pgpro_edition')::text")); - if (!ed.IsEmpty()) ed=ExecuteScalar(wxT("select pgpro_edition()")); + if (ed=="pgpro_edition") { + ed=ExecuteScalar(wxT("select pgpro_edition()")); + } if (ed==wxT("enterprise")) isPgProEnt=true; isGreenplum = version.Upper().Matches(wxT("*GREENPLUM DATABASE*")); diff --git a/frm/frmDatabaseDesigner.cpp b/frm/frmDatabaseDesigner.cpp index 2eadaf3..a8164e9 100644 --- a/frm/frmDatabaseDesigner.cpp +++ b/frm/frmDatabaseDesigner.cpp @@ -8,8 +8,6 @@ // frmDatabaseDesigner.cpp - The database designer form // ////////////////////////////////////////////////////////////////////////// -#ifdef DATABASEDESIGNER - #include "pgAdmin3.h" // wxWindows headers #include @@ -927,4 +925,3 @@ wxWindow *databaseDesignerFactory::StartDialog(frmMain *form, pgObject *obj) qry = obj->GetSql(form->GetBrowser()); return StartDialogDesigner(form, obj, qry); } -#endif \ No newline at end of file