Redundant UNIQUE specs (was Re: [GENERAL] bad error message)
| От | Tom Lane |
|---|---|
| Тема | Redundant UNIQUE specs (was Re: [GENERAL] bad error message) |
| Дата | |
| Msg-id | 24919.982023560@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | bad error message ("Martin A. Marques" <martin@math.unl.edu.ar>) |
| Список | pgsql-hackers |
"Martin A. Marques" <martin@math.unl.edu.ar> 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
В списке pgsql-hackers по дате отправления: