GNUmed v12.16 Maintenance Release
Karsten Hilbert <[email protected]> Thu, 16 Nov 2017 10:46:48 +0100
| Newsgroups | gmane.comp.gnu.medical.announce |
|---|---|
| Message-ID | <20171116094647.mzjb522ows7dzwoj__896.684316876595$1510825630$gmane$org@hermes.hilbert.loc> |
--2xxym3e23phdcih3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In issue has been discovered in the database fixup scripts
delivered with the v1.6.16/v21.16 release.
It will manifest itself in
$> gm-fixup_server 21
failing to complete and showing an error message.
Note: no harm is done to any data, the fixup attempt is
rerunnable at any time due to the very nature of the fixup
mechanism.
The issue can be mitigated by dropping the attached files
into
.../server/sql/v20-v21/fixups/
say, on Debian,
/var/lib/gnumed/server/sql/v20-v21/fixups/
and running
$> gm-fixup_server 21
again.
The next Maintenance Release will also contain these fixes.
Regards,
Karsten
--
--2xxym3e23phdcih3
Content-Type: application/x-sql
Content-Disposition: attachment; filename="v21-audit-add_table_for_audit-fixup.sql"
Content-Transfer-Encoding: quoted-printable
-- GNUmed auditing functionality=0A-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=0A-- license: GPL v2 or later=0A-- author: Karsten Hilbert=
=0A=0A-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A-- force ter=
minate + exit(3) on errors if non-interactive=0A\set ON_ERROR_STOP 1=0A=0A-=
- --------------------------------------------------------------=0Adrop fun=
ction if exists audit.add_table_for_audit(name, name) cascade;=0A=0Acreate =
or replace function audit.add_table_for_audit(name, name)=0A returns boolea=
n=0A language 'plpgsql'=0A security definer=0A as '=0ADECLARE=0A _relnamesp=
ace alias for $1;=0A _relname ALIAS FOR $2;=0A dummy RECORD;=0A tmp text;=
=0ABEGIN=0A -- does table exist ?=0A select relname into dummy from pg_clas=
s where=0A relname =3D _relname and=0A relnamespace =3D (select oid from =
pg_namespace where nspname =3D _relnamespace)=0A ;=0A if not found then=0A =
tmp :=3D _relnamespace || ''.'' || _relname;=0A raise exception ''audit.a=
dd_table_for_audit: Table [%] does not exist.'', tmp;=0A return false;=0A =
end if;=0A -- already queued for auditing ?=0A select 1 into dummy from aud=
it.audited_tables where table_name =3D _relname and schema =3D _relnamespac=
e;=0A if found then=0A return true;=0A end if;=0A -- add definition=0A ins=
ert into audit.audited_tables (=0A schema, table_name=0A ) values (=0A _r=
elnamespace, _relname=0A );=0A return true;=0AEND;';=0A=0Acomment on functi=
on audit.add_table_for_audit (name, name) is=0A 'sanity-checking convenienc=
e function for marking tables for auditing';=0A=0A=0Adrop function if exist=
s audit.add_table_for_audit(name) cascade;=0A=0Acreate or replace function =
audit.add_table_for_audit(name)=0A returns boolean=0A language SQL=0A secur=
ity definer=0A as '=0Aselect audit.add_table_for_audit(''public'', $1);';=
=0A=0Acomment on function audit.add_table_for_audit(name) is=0A 'sanity-che=
cking convenience function for marking tables=0A for auditing, schema is a=
lways "public"';=0A=0A-- --------------------------------------------------=
------------=0Aselect gm.log_script_insertion('v21-audit-add_table_for_audi=
t-fixup.sql', '21.16');=0A
--2xxym3e23phdcih3
Content-Type: application/x-sql
Content-Disposition: attachment; filename="v21-i18n-lang_funcs-fixup.sql"
Content-Transfer-Encoding: quoted-printable
-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=0A-- GNUmed fixed string internationalisation (SQL gettext)=
=0A-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=0A-- force terminate + exit(3) on errors if non-interact=
ive=0A\set ON_ERROR_STOP 1=0A=0A-- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=0Adrop function if exists i18n.set_curr_lang(text) ca=
scade;=0A=0Acreate function i18n.set_curr_lang(text)=0A returns boolean=0A =
language 'plpgsql'=0A security definer=0A as '=0ADECLARE=0A _lang ALIAS FOR=
$1;=0ABEGIN=0A if exists(select pk from i18n.translations where lang =3D _=
lang) then=0A delete from i18n.curr_lang where user =3D CURRENT_USER;=0A =
insert into i18n.curr_lang (lang) values (_lang);=0A return true;=0A end i=
f;=0A raise notice ''Cannot set current language to [%]. No translations av=
ailable.'', _lang;=0A return false;=0AEND;=0A';=0A=0Acomment on function i1=
8n.set_curr_lang(text) is=0A 'set preferred language:=0A - for "current us=
er"=0A - only if translations for this language are available';=0A=0A-- =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0Adrop functio=
n if exists i18n.force_curr_lang(text) cascade;=0A=0Acreate function i18n.f=
orce_curr_lang(text)=0A returns boolean=0A language 'plpgsql'=0A security d=
efiner=0A as '=0ADECLARE=0A _lang ALIAS FOR $1;=0ABEGIN=0A raise noti=
ce ''Forcing current language to [%] without checking for translations..'',=
_lang;=0A delete from i18n.curr_lang where user =3D CURRENT_USER;=0A =
insert into i18n.curr_lang(lang) values (_lang);=0A return 1;=0AEND;=0A=
';=0A=0Acomment on function i18n.force_curr_lang(text) is=0A 'force preferr=
ed language to some language:=0A - for "current user"';=0A=0A-- ----------=
----------------------------------------------------=0Aselect gm.log_script=
_insertion('v21-i18n-lang_funcs-fixup.sql', '21.16');=0A
--2xxym3e23phdcih3
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Gnumed-announce mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnumed-announce
--2xxym3e23phdcih3--