db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: (Derby 167) was Re: [Patch] Re: About improvement of DERBY-134
Date Sun, 03 Apr 2005 14:12:59 GMT
TomohitoNakayama wrote:

> Hello.
>
> I was interested in issue of Derby-167...
>
> I recognized there was proposed three options.
> 1:being able to "generate by default as identity"
> 2:being able to disable the "identity" feature for a column
> 3:being able to generate a column as non identity and after data is
> populated, alter table to add the "identity" to the column
>
> In my opinion , option 2 and option 3  increase statuses which table
> can take , identity feature working state and not working state,
> so they would make it complex to maintain db.
> On the other hand, if we take option 1, we need to prevent it from to
> have same value in identity column.
>
I think it's ok to let the user prevent duplicates  with a primary key
if they want to. 
When creating the table,  the user would need to make sure that they
used START WITH  to ensure that generation starts with the maximum value
+ 1.  I put a comment in the bug with how I think the process would go.

A bit precarious I know if you forget to create your table properly, but
at least it makes it *possible* to load data.
Later we could enhance support for ALTER TABLE to alter the identity
column specification to specify a RESTART WITH value.

Thanks


Kathey





Mime
View raw message