Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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: chkdbver.patch
Description: application/octet-stream (951 bytes)

Responses

pgadmin-hackers by date

Next:From: Dave PageDate: 2009-01-13 10:51:48
Subject: Re: about new module to software
Previous:From: Quan ZongliangDate: 2009-01-13 06:03:17
Subject: Re: about new module to software

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group