db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shreyas Kaushik <Shreyas.Kaus...@Sun.COM>
Subject Re: DB2 mode vs. Cloudscape mode
Date Fri, 04 Mar 2005 03:37:04 GMT

~ Shreyas.

Bernt M. Johnsen wrote:

>Hi all!
>
>In the Derby source, I find several comments referring to "DB2 mode"
>and "Cloudscape mode". I can't, however, find any code related to a
>distinction between these two modes. Are these comments "leftovers"
>from the pre-Derby period of the code, or have I missed something?
>
>The reason I wonder is the error message
>
>ij> create table tab (i integer primary key);
>ERROR 42831: 'I' cannot be a column of a primary key or unique key because it can contain
null values.
>  
>
This shouldn't happen, NOT NULL should be implicit, right?

>and comments in the code like
>
>  
>
>>* Set all columns in that appear in a primary/unique key constraint in a create
>>* table statement to NOT NULL in Cloudscape mode and raises an error in DB2 mode.
>>    
>>
>
>and 
>
>  
>
>> /* For primary/unique/unique keys, verify that the constraint's column
>>  * list contains valid columns and does not contain any duplicates
>>  * (Also, all columns in a primary key will be set to non-null,
>>	but only in Cloudscape mode. SQL and DB2 require explict NOT NULL.
>>    
>>
>
>  
>

Mime
View raw message