incubator-empire-db-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eike Kettner <n...@eknet.org>
Subject DBSequence Table and PostGre
Date Sun, 27 Jun 2010 14:49:45 GMT
Hello there

I think I found a bug in DBSeqTable#getNextValue():

I use postgre sql and getting the next sequence value, the 
getNextValue() goes into an endless loop. It fails when updating the 
sequence value and therefore tries again and again and again...

It cannot update the sequence because postgre sql stores milli and 
nanoseconds within the timestamp. The WHERE clause from the update omit 
the milli and nanoseconds. So it tries to update ... WHERE 
timestamp='2010-06-10 14:22:24'  but in DB it is '2010-06-10 
14:22:24.21231'.  The update fails and the loop does never stop. It 
would be great to be informed somehow if the loop goes beyound some big 
value.  I did not dig into this deeper, I'm using a quick workaround 
that saves the time as a long (override getNextValue()).

kind regards,
Eike





Mime
View raw message