gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Strange


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Strange
Date: Thu, 21 Nov 2013 13:40:06 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Nov 21, 2013 at 05:36:56PM +0530, Vaibhav Banait wrote:

> The log file says lot about locale.

Yes.

> I think that is not creating a problem other than showing error message at 
> login.

I agree.

> 1. ERROR     gm.db 
> (d:\workplace\gnumed-server.19.0\build\pyi.win32\gnumed\outpyz1.pyz\gnumed.pycommon.gmpg2::run_rw_queries()
>  #1334): RW query failed: [

Since you've cut off exactly the failing query we can't tell for sure.

> 2.  ERROR     gm.db 
> (d:\workplace\gnumed-server.19.0\build\pyi.win32\gnumed\outpyz1.pyz\gnumed.pycommon.gmpg2::run_rw_queries()
>  #1337): PG error code: 23503

It must have been a query involving a foreign key.

> 3. ERROR     gm.db 
> (d:\workplace\gnumed-server.19.0\build\pyi.win32\gnumed\outpyz1.pyz\gnumed.pycommon.gmpg2::run_rw_queries()
>  #1339): PG error message: ERROR:  insert or update on table 
> "substance_intake" violates foreign key constraint 
> "substance_intake_fk_episode_fkey"

This IS a RW query involving a foreign key so that might
be the query in question.

> DETAIL:  Key (fk_episode)=(555) is not present in table "episode".
> 3. IntegrityError: insert or update on table "substance_intake" violates 
> foreign key constraint "substance_intake_fk_episode_fkey" DETAIL:  Key 
> (fk_episode)=(555) is not present in table "episode".

This is (one of) the row(s) involved in the problem. Some/one
of your substance intake entries is not properly linked to an
episode. It is hardly of any help to speculate how that
happened. It is more interesting how to fix it. The first step
is to gather more information from the database from which
you pulled that backup or from which you upgraded:

        select * from clin.v_substance_intakes where pk_episode = 555;

        select * from clin.substance_intake where fk_episode = 555;

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

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