gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] Upgrades contain unwanted data (for example database v17


From: Busser, Jim
Subject: [Gnumed-devel] Upgrades contain unwanted data (for example database v17 bootstraps German ref.billable data)
Date: Sun, 1 Jul 2012 02:59:42 +0000

Hi all,

While I have no doubt that the billables sourced from

        Gebührenordnung für Ärzte

and included in database upgrades (v17 database) may be convenient to at least 
some production users of GNUmed, this data is not relevant to all users.

My two questions are:

(1) If Karsten desires to continue to include such preferred-to-be optional 
data in future upgrades, perhaps for "demo" purposes, can we in future have a 
parameter with which to call

        upgrade-db.sh

so as to include or exclude such data?

(2) How to most cleanly remove this billing data? I tried (using psql)

        set default_transaction_read_only to off; 

        begin;

        delete from ref.billable where fk_data_source=
        (select pk from ref.data_source where name_short = 'GOÄ');

but was warned

        ERROR:  record "old" has no field "row_version"
        CONTEXT:  PL/pgSQL function "ft_del_billable" line 2 at SQL statement

and since it appeared the purpose of "ft_del_billable" was to ensure the 
preservation, in the audit.log what I did not need preserved there, was it 
(hopefully) ok to have done

        ALTER TABLE ref.billable
        DISABLE TRIGGER zt_del_billable;

        delete from ref.billable where fk_data_source=
        (select pk from ref.data_source where name_short = 'GOÄ');

        ALTER TABLE ref.billable
        ENABLE TRIGGER zt_del_billable;

        delete from ref.data_source where name_short = 'GOÄ';

which appeared to work and to achieve what I desired to achieve??

-- Jim


reply via email to

[Prev in Thread] Current Thread [Next in Thread]