SERIAL + PRIMARY KEY = redundant indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема SERIAL + PRIMARY KEY = redundant indexes
Дата
Msg-id 13301.926431533@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
With current sources:

regression=> create table t1 ( f1 serial primary key );
NOTICE:  CREATE TABLE will create implicit sequence t1_f1_seq for SERIAL column t1.f1
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index t1_pkey for table t1
CREATE

OK so far ...

regression=> create table t2 ( f1 serial,
regression-> primary key (f1) );
NOTICE:  CREATE TABLE will create implicit sequence t2_f1_seq for SERIAL column t2.f1
NOTICE:  CREATE TABLE/UNIQUE will create implicit index t2_f1_key for table t2
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index t2_pkey for table t2
CREATE

And, indeed, it's made two separate indexes on t2's f1 field.  This is
a bug, no?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] 6.5 TODO list
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: [SQL] plpgsql error