"Martin A. Marques" <[EMAIL PROTECTED]> writes:
> test=# CREATE TABLE dedicacion (
> test(#        id_dedi          SERIAL UNIQUE,
> test(#        nombre_dedi      CHAR(10) UNIQUE
> test(# );
> NOTICE:  CREATE TABLE will create implicit sequence 'dedicacion_id_dedi_seq' 
> for SERIAL column 'dedicacion.id_dedi'
> NOTICE:  CREATE TABLE/UNIQUE will create implicit index 
> 'dedicacion_id_dedi_key' for table 'dedicacion'
> NOTICE:  CREATE TABLE/UNIQUE will create implicit index 
> 'dedicacion_id_dedi_key' for table 'dedicacion'
> NOTICE:  CREATE TABLE/UNIQUE will create implicit index 
> 'dedicacion_nombre_dedi_key' for table 'dedicacion'
> ERROR:  Cannot create index: 'dedicacion_id_dedi_key' already exists

Hm.  There is code in the parser to discard duplicate UNIQUE
specifications when a PRIMARY KEY is present.  Shouldn't it just
do so in all cases, PRIMARY KEY or no?

                        regards, tom lane

Reply via email to