db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-991) Defining the same primary key twice on a table actually attempts to create two constraints.
Date Wed, 15 Feb 2006 14:28:10 GMT
Defining the same  primary key twice on a table actually attempts to create two constraints.
--------------------------------------------------------------------------------------------

         Key: DERBY-991
         URL: http://issues.apache.org/jira/browse/DERBY-991
     Project: Derby
        Type: Bug
    Versions: 10.2.0.0    
    Reporter: Daniel John Debrunner
    Priority: Minor


Defining the same  primary key twice on a table actually attempts to create two constraints.

ij> create table t ( i int, b int,  primary key (i,b), primary key (i,b));
ERROR 42Z93: Constraints 'SQL060215062628851' and 'SQL060215062628850' have the
same set of columns, which is not allowed.

ij> create table t ( i int primary key primary key primary key);
ERROR 42Z93: Constraints 'SQL060214082337951' and 'SQL060214082337950' have the
same set of columns, which is not allowed.

Other combinations of two primary keys (that I could think of) return the correct error.

ij> create table t ( i int, b int,  primary key (i,b), primary key (b));
ERROR 42X90: More than one primary key constraint specified for table 'T'.
ij> create table t ( i int primary key, b int primary key);
ERROR 42X90: More than one primary key constraint specified for table 'T'.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message