db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: [Derby-359]Skipping over user inserted values into GENERATED BY DEFAULT identity columns....
Date Thu, 15 Dec 2005 16:03:07 GMT
>>I would be happy if Derby can consume identity values even if current
>>insert statement fails. For this case, some insert statements may fail
>>when they generate a value that is already present. But subsequent
>>inserts should pass.
> 
> I wonder if the counter should be bumped to the max value on a failed
> insert, there is only a problem if a unique index exists, so getting the
> max will be fast.

I'm not sure why the user would want *any* inserts to fail. If the
database can figure out the current max, and generate a new value which
is beyond that, thus causing the insert to succeed, then that seems like
the best outcome.

thanks,

bryan



Mime
View raw message