db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <be...@sun.com>
Subject DB2 mode vs. Cloudscape mode
Date Thu, 03 Mar 2005 20:53:19 GMT
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.

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.


>  /* 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.

Bernt Marius Johnsen, HA Data Management, Sun Microsystems, Norway
NOTICE: This signature is neither personal, religious, literary,
ethnic, racial, offensive nor humorous. 

View raw message