db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ateesh_Ve...@rapid7.com
Subject RE: "generated by default" question
Date Thu, 15 Jun 2006 18:04:56 GMT
Here is a different view to the problem.

I have a bulk export-import routine that exports all the tables into .del 
files for backup using SYSCS_UTIL.SYSCS_EXPORT_TABLE and 

The export-import worked just fine until I realized that I cannot INSERT 
into any of the tables that have IDENTITY columns. This is because while 
importing all the identity columns are filled "manually".
So, the autoincrement counter is still at 0 while there already are rows 
with higher values.

I worked around that issue by using 'ALTER TABLE columnName ALTER COLUMN 
columnName RESTART WITH (current_max + 1)'.

But this proves that the current derby behavior is misleading if not wrong 
(no matter what the specs suggest). Derby SHOULD generate a unique id 

I am pretty sure that, for someone who is familiar with the code fixing 
the bug will be quicker and less painful than continuing with this debate.

View raw message