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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: help with version checking



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group