[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Eureka! - ?found the error gnuMed running now
From: |
Richard Terry |
Subject: |
Re: [Gnumed-devel] Eureka! - ?found the error gnuMed running now |
Date: |
Thu, 8 Dec 2005 08:47:07 +1100 |
User-agent: |
KMail/1.9 |
Have the gnuMed client running now, with standard postgres.conf and
pg_hba.conf.
After much stuffing around, I've narrowed the problem down to the text below.
Karsten: if I removed your text from between the if not found then and endif,
and replace it with a simple error message, the whole database continues to
boot and the gnumed client runs.
see the section below separated by lines of ============== characters which
contain the difference.
gmDemographics-Person-views.sql:
create function set_nickname(integer, text) returns integer as '
DECLARE
_id_identity alias for $1;
_nick alias for $2;
_names_row record;
BEGIN
-- 0.1: Just always set the nickname inside the active name
-- post 0.1: openEHR-like (name: pk, fk_identity, name, fk_type,
comment,
is_legal, is_active ...)
-- does name exist ?
select into _names_row * from names where id_identity = _id_identity
and
active = true;
==========================================
Original text:
if not found then
msg := ''Cannot set nickname ['' || _nick || '']. No active
<names> row with
id_identity ['' || _id_identity || ''] found.''
raise exception msg;
end if;
============================================
Replaced with this, it now works:
if not found then
raise exception '' my message'';
end if;
So I guess the syntax error is in your text somewhere.
=============================================
-- can directly set nickname ?
-- if _names_row.preferred is null then
update names set preferred = _nick where id = _names_row.id;
return _names_row.id;
-- end if;
-- must create new row
-- 1) deactivate old row ...
-- update names set active = false where id = _names_row.id;
-- 2) insert new row from old row and new data ...
--insert into names (id_identity, active, firstnames, lastnames,
preferred,
comment)
-- values (_id_identity, true, _names_row.firstnames,
_names_row.lastnames,
_nick, _names_row.comment);
--if found then
-- return currval(''names_id_seq'');
--end if;
--return NULL;
END;' language 'plpgsql';
On Thursday 08 December 2005 08:18, Richard Terry wrote:
> Back to not booting demographics again with the fresh update!!!.
- [Gnumed-devel] errors - going backwards, Richard Terry, 2005/12/07
- Re: [Gnumed-devel] Eureka! - ?found the error gnuMed running now,
Richard Terry <=
- Re: [Gnumed-devel] Eureka! - ?found the error gnuMed running now, Sebastian Hilbert, 2005/12/07
- Re: [Gnumed-devel] Eureka! - ?found the error gnuMed running now, Karsten Hilbert, 2005/12/08
- Re: [Gnumed-devel] Eureka! - ?found the error gnuMed running now, J Busser, 2005/12/08
- Message not available
- [Gnumed-devel] When will GNUmed be ready (was Eureka! - ?found the error gnuMed running now), J Busser, 2005/12/09
- [Gnumed-devel] Re: When will GNUmed be ready (was Eureka! - ?found the error gnuMed running now), Andreas Tille, 2005/12/09
- Re: [Gnumed-devel] Re: When will GNUmed be ready (was Eureka! - ?found the error gnuMed running now), Sebastian Hilbert, 2005/12/09
- Re: [Gnumed-devel] Re: When will GNUmed be ready (was Eureka! - ?found the error gnuMed running now), Karsten Hilbert, 2005/12/09
- [Gnumed-devel] GNUmed brochures (was When will GNUmed be ready), J Busser, 2005/12/11
- Re: [Gnumed-devel] GNUmed brochures (was When will GNUmed be ready), Karsten Hilbert, 2005/12/13
- Re: [Gnumed-devel] GNUmed brochures (was When will GNUmed be ready), Hilmar Berger, 2005/12/13