db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [Derby-359]Skipping over user inserted values into GENERATED BY DEFAULT identity columns....
Date Thu, 15 Dec 2005 15:01:52 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Daniel John Debrunner wrote:
<blockquote cite="mid43A103A5.8060402@debrunners.com" type="cite">
  <pre wrap="">Satheesh Bandaram wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">
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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I wouldn't! I think you are saying that it's ok for inserts to fail
until a value is found that is not currently used. If I pre-loaded a
table with 100,000 rows with consective values, then it's going to
require 100,000 subsequent failing inserts before one succeeds. Ie. the
counter has gone beyond the max value used. That would result in very
unhappy customers in an e-commerce site</pre>
</blockquote>
I suppose that is another way to solve the problem... When I filed the
bug in Jira, what I proposed would have been sufficient for me. If you
or Mamta have itch for a different solution, that is fine too. But I
wouldn't expect users to want to skip 100,000&nbsp; values by issuing that
many failed inserts. That is usually done by ALTER TABLE command, that
sets START WITH option. While Derby already supports changing INCREMENT
BY using ALTER TABLE, I think there is a pending enhancement to enhance
ALTER TABLE to allow setting STARTS WITH value.<br>
<br>
Satheesh<br>
<br>
</body>
</html>


Mime
View raw message