Patch: database version check - Mailing list pgadmin-hackers

From Quan Zongliang
Subject Patch: database version check
Date
Msg-id 20090113180903.9B88.4125B4E5@gmail.com
Whole thread Raw
Responses Re: Patch: database version check  ("Dave Page" <dpage@pgadmin.org>)
List pgadmin-hackers
Hi, Dave

very simple patch:

pgAdmin3.h
+const short SERVER_MAX_VERSION = 0x0805;//Exclusive

pgServer.cpp

+        if (conn->BackendMinimumVersion(SERVER_MAX_VERSION >> 8, SERVER_MAX_VERSION & 0x00FF))
+            wxMessageBox(_("Connected to newer database using old version pgAdmin, some function could not run
properly.\nUpgradeis recommended.")); 
+

I had tried to define a new class pgCheckBoxEntryDialog, but
it make pgAdmin's process always live after close.
I'm not familiar about it.  First, make a tiny patch.

It's not needed to define a new function to check version.
So, define a exclusive version: SERVER_MAX_VERSION.

Before commit, don't forget to modify message text.

-----------------------------------------------
Quan Zongliang
quanzongliang@gmail.com
CIT Japan:  http://www.cit.co.jp
CIT China:  http://www.citbj.com.cn

Attachment

pgadmin-hackers by date:

Previous
From: Quan Zongliang
Date:
Subject: Re: about new module to software
Next
From: "Dave Page"
Date:
Subject: Re: about new module to software