08.03.2016 20:10, Dimitry Sibiryakov wrote:

>> Do you want to throw a syntax error from the parser or something more
>> intelligent like "duplicate constraint definitions are not allowed" from
>> DdlNodes?
>
>     Standard syntax error from parser is the simplest solution:
>
>> SQL> create table t (a integer not null not null);
>> Statement failed, SQLSTATE = 42000
>> SQL error code = -637
>> -duplicate specification of NOT NULL - not supported
>
>> What about (a int primary key primary key)? Is it also allowed or NOT
>> NULL is the only problem?
>
>     It already works this way:
>
>> SQL> create table t (a integer primary key primary key);
>> Statement failed, SQLSTATE = 27000
>> unsuccessful metadata update
>> -CREATE TABLE T failed
>> -action cancelled by trigger (3) to preserve data integrity
>> -Attempt to define a second PRIMARY KEY for the same table
>
>> SQL> create table t (a integer unique unique);
>> Statement failed, SQLSTATE = 42000
>> unsuccessful metadata update
>> -CREATE TABLE T failed
>> -Same set of columns cannot be used in more than one PRIMARY KEY and/or 
>> UNIQUE constraint definition

Looks OK to me.


Dmitry


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to