[ http://issues.apache.org/jira/browse/DERBY-158?page=history ]
Jeremy Boynes updated DERBY-158:
--------------------------------
Attachment: derby-158-1.patch
Patch to TableElementList that implicitly adds NOT NULL to columns included in
a PRIMARY KEY constraint contained in a CREATE TABLE statement. However, it
does not allow UNIQUE to be added in CREATE TABLE if any of the columns are
NULL; similarly UNIQUE or PRIMARY KEY constraints cannot be added with ALTER
TABLE if any of the columns are nullable.
I am posting this first for review as a couple of tests still need to be
updated.
> PRIMARY KEY does not imply NOT NULL
> -----------------------------------
>
> Key: DERBY-158
> URL: http://issues.apache.org/jira/browse/DERBY-158
> Project: Derby
> Type: Bug
> Components: SQL
> Reporter: Bernt M. Johnsen
> Assignee: Jeremy Boynes
> Priority: Minor
> Attachments: derby-158-1.patch
>
> PRIMARY KEY does not imply NOT NULL. Derby issues 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 is neither compliant with SQL-92 nor with SQL-99 (Feature E141-08, I
> think).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira