Loading...

ddlutils-user@db.apache.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

Identity start values (from Postgres to Derby) Laurent ROCHE Fri Nov 24 12:04:17 2006

Hi All,

I could not find anything about this issue on the website nor JIRA. Can the 
mailing list archives be searched ?

I am doing an export from a PostgreSQL database to a Derby database.
Some of my tables have one SERIAL colum (in Postgres) which is correctly 
translated into Identity (in Derby) ... however the Identity value generated 
will be always 1 as the tables are created like this:
CREATE TABLE my_table_auto(auto_id  SMALLINT NOT NULL GENERATED BY DEFAULT AS 
IDENTITY (START WITH 1, INCREMENT BY 1), ...

I would expect DDL-Utils to generate something along the lines of:
ALTER TABLE my_table_auto ALTER COLUMN auto_id  RESTART WITH 
max_val_in_the_table

Where of course max_val_in_the_table is the maximum plus 1 of the id of the 
table 
(i.e. SELECT MAX(auto_id) + 1 FROM my_table_auto)

Am I missing something ? Is this not supported ?

 
Have fun,
[EMAIL PROTECTED]
The Travelling Froggy
TravellingFroggy.info




        

        
                
___________________________________________________________________________ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com