[Babase] Re: repstats rebuild error

Karl O. Pinc kop at meme.com
Fri Mar 5 10:47:21 EST 2010


On 03/05/2010 08:47:47 AM, Niki Learn wrote:
> Karl,
> 
>  
> 
> I got this error yesterday and thought it was probably due to two
> young
> females who just started cycling in December.  I had entered their
> maturedates but could not enter their matching cycles because they 
> did
> not
> end until after the statdate.  So I figured they would likely be the
> culprits since they would seemingly then not be cycling, pregnant, or
> lactating, but I deleted their maturedates and still got the same
> error.  I
> will check again to see if there are any others that are fishy.  But
> is
> there anything else that might cause this error?

The problem has to do with gaps (CYCGAPS).  I've modified
the rebuild_repstats() program to report who's having
the problem on what date and am running it in
babase_test now.  I'll investigate further....

P.S.  I also want to restart the database server.
Is there any reason to be careful because someone's
using it and needs it constantly?

> 
>  
> 
> Thanks,
> 
> Niki
> 
>  
> 
> SELECT rebuild_all_repstats();
> 
> 
> SQL error:
> 
> ERROR:  null value in column "state" violates not-null constraint
> 
> CONTEXT:  SQL statement "INSERT INTO repstats (sname, date, state,
> dins,
> pid) VALUES ( $1 ,  $2 ,  $3 ,  $4 ,  $5 )"
> 
> PL/pgSQL function "rebuild_repstats" line 177 at SQL statement
> 
> SQL statement "SELECT  rebuild_repstats( $1 )"
> 
> PL/pgSQL function "rebuild_all_repstats" line 34 at perform
> 
> In statement:
> SELECT rebuild_all_repstats();
> 
>  
> 
> Line 1: ERROR: null value in column "state" violates not-null
> constraint
> CONTEXT: SQL statement "INSERT INTO repstats (sname, date, state,
> dins, pid)
> VALUES ( $1 , $2 , $3 , $4 , $5 )"
> PL/pgSQL function "rebuild_repstats" line 177 at SQL statement
> SQL statement "SELECT rebuild_repstats( $1 )"
> PL/pgSQL function "rebuild_all_repstats" line 34 at perform
> 
> Total runtime: 2,902,171.843 ms
> 
>  
> 
> 




Karl <kop at meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein




More information about the Babase mailing list