\r
Date Dev Ver Change details\r
---------- --- ----- --------------\r
+2009-01-13 DP 1.9.0 Warn the user if connecting to a newer version of the\r
+ server than is supported.\r
2009-01-12 DP 1.9.0 Add support for Window functions [Ashesh Vashi]\r
2009-01-09 DP 1.9.0 Add an option to ignore server version mismatches with\r
pg_dump/pg_dumpall/pg_restore.\r
#error wxWidgets must be compiled with Unicode support to build pgAdmin.
#endif
-const float SERVER_MIN_VERSION = 7.3f;
+// Supported server minimum and maximum values.
+const short SERVER_MIN_VERSION_N = 0x0703;
+const wxString SERVER_MIN_VERSION_T = wxT("7.3");
+const short SERVER_MAX_VERSION_N = 0x0804;
+const wxString SERVER_MAX_VERSION_T = wxT("8.4");
// The registry file
#ifndef __WXMSW__
dbOid = conn->GetDbOid();
// Check the server version
- if (conn->BackendMinimumVersion(7, 3))
+ if (conn->BackendMinimumVersion(SERVER_MIN_VERSION_N >> 8, SERVER_MIN_VERSION_N & 0x00FF))
{
+ // Warn the user if this is a newer version of PostgreSQL than we know of.
+ if (conn->BackendMinimumVersion(SERVER_MAX_VERSION_N >> 8, (SERVER_MAX_VERSION_N & 0x00FF) + 1))
+ wxLogWarning(_("This version of pgAdmin has only been tested with PostgreSQL version %s and below and may not function correctly with this server. Please upgrade pgAdmin."), SERVER_MAX_VERSION_T);
+
connected = true;
bool hasUptime=false;
}
else
{
- error.Printf(_("The PostgreSQL server must be at least version %2.1f!"), SERVER_MIN_VERSION);
+ error.Printf(_("The server version %s is older than is supported by this release of pgAdmin."), SERVER_MIN_VERSION_T);
connected = false;
status = PGCONN_BAD;
}