You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Jeremy Boynes (JIRA)" <de...@db.apache.org> on 2005/03/05 05:45:47 UTC
[jira] Updated: (DERBY-158) PRIMARY KEY does not imply NOT NULL
[ 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
Re: [jira] Updated: (DERBY-158) PRIMARY KEY does not imply NOT NULL
Posted by Jeremy Boynes <jb...@apache.org>.
Mamta Satoor wrote:
> Hi Jeremy,
>
> I was wondering if you added test cases for alter table for this bug?
>
I didn't - I did review the existing ones but didn't add anything as I
thought they covered it (the behaviour for alter table did not change).
--
Jeremy
Re: [jira] Updated: (DERBY-158) PRIMARY KEY does not imply NOT NULL
Posted by Mamta Satoor <ms...@gmail.com>.
Hi Jeremy,
I was wondering if you added test cases for alter table for this bug?
thanks,
Mamta
On Sat, 5 Mar 2005 05:45:47 +0100 (CET), Jeremy Boynes (JIRA)
<de...@db.apache.org> wrote:
> [ 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
>
>