Re: help with version checking - Mailing list pgsql-sql

From Karsten Hilbert
Subject Re: help with version checking
Date
Msg-id 20061229115945.GD4668@merkur.hilbert.loc
Whole thread Raw
In response to Re: help with version checking  (Arnau <arnaulist@andromeiberica.com>)
List pgsql-sql
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&root=gnumed&view=log

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


pgsql-sql by date:

Previous
From: roopa perumalraja
Date:
Subject: Help in altering the column lenght
Next
From: Arnau
Date:
Subject: Re: help with version checking