Re: help with version checking
От | Karsten Hilbert |
---|---|
Тема | Re: help with version checking |
Дата | |
Msg-id | 20061229115945.GD4668@merkur.hilbert.loc обсуждение исходный текст |
Ответ на | Re: help with version checking (Arnau <arnaulist@andromeiberica.com>) |
Список | 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 по дате отправления: