db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent ROCHE <laurent_ro...@yahoo.com>
Subject Identity start values (from Postgres to Derby)
Date Fri, 24 Nov 2006 18:00:07 GMT
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,
L@u
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

Mime
View raw message