gnumed-devel
[Top][All Lists]
Advanced

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

[Gnumed-devel] changes to add_name() in SQL


From: Karsten Hilbert
Subject: [Gnumed-devel] changes to add_name() in SQL
Date: Sun, 23 Nov 2003 23:11:43 +0100
User-agent: Mutt/1.3.22.1i

Syan,

your changes did seem to work but were just a workaround to
the broken trigger function f_uniq_active_name(). I disabled
the trigger altogether for now. The trigger function is what
we need to work on. It's intent is to be a before trigger that
sets all names for a given identity to inactive IF the
incoming update or insert is active. I am researching that but
cannot get it to work yet. I would have thought it works like
this:

if NEW.active = false then
    return NEW;
end if;
update
    names
set
    active = false
where
    id_identity = NEW.id_identity and
    active = true
;
return NEW;

For some reason this doesn't work.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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