Patch: database version check

From: Quan Zongliang <quanzongliang(at)gmail(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org(dot)
Subject: Patch: database version check
Date: 2009-01-13 09:25:49
Message-ID: 20090113180903.9B88.4125B4E5@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.\nUpgrade is 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(at)gmail(dot)com
CIT Japan: http://www.cit.co.jp
CIT China: http://www.citbj.com.cn

Attachment Content-Type Size
chkdbver.patch application/octet-stream 951 bytes

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2009-01-13 10:51:48 Re: about new module to software
Previous Message Quan Zongliang 2009-01-13 06:03:17 Re: about new module to software