From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: help with version checking
Date: Fri, 29 Dec 2006 12:59:45 +0100
Message-ID: <20061229115945.GD4668@merkur.hilbert.loc> (raw)
In-Reply-To: <45940B07.4010708@andromeiberica.com>
References: <000001c72aa7$e705f1e0$0b00a8c0@tedy>
<45940403.4010909@andromeiberica.com>
<21284.1167328587@sss.pgh.pa.us>
<459409A2.9020103@andromeiberica.com>
<45940B07.4010708@andromeiberica.com>
In GNUmed we have created a function
gm_concat_table_structure()
in
http://cvs.savannah.gnu.org/viewcvs/gnumed/gnumed/server/sql/gmSchemaRevisionViews.sql?rev=1.6&r...
which returns a reproducable, human-readable TEXT
concatenation of all the relevant parts of the schema.
We then do
select md5(gm_concat_table_structure());
and compare the output to known hashes for certain schema
versions. That way we don't simply "believe" what is in a
table "current_version" but rather actually *detect* (within
reasonable limits) the version.
It works well so far, no noticably delay even during client
startup (which does the check and complains on mismatches).
It may not scale particularly well to very large schemata,
possibly.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: Karsten.Hilbert@gmx.net
Subject: Re: help with version checking
In-Reply-To: <20061229115945.GD4668@merkur.hilbert.loc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox