Re: Poor performance on very simple query ?

Поиск
Список
Период
Сортировка
От Guillaume Cottenceau
Тема Re: Poor performance on very simple query ?
Дата
Msg-id 87zmcdposj.fsf@meuh.mnc.lan
обсуждение исходный текст
Ответ на Re: Poor performance on very simple query ?  (Tobias Brox <tobias@nordicbet.com>)
Список pgsql-performance
Tobias Brox <tobias 'at' nordicbet.com> writes:

> Oh - it is.  How can you have a default value on a primary key?  Will it

you can but it is useless :)

foo=# create table bar (uid int primary key default 0, baz text);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "bar_pkey" for table "bar"
CREATE TABLE
foo=# insert into bar (baz) values ('');
INSERT 217426996 1
foo=# insert into bar (baz) values ('');
ERROR:  duplicate key violates unique constraint "bar_pkey"

--
Guillaume Cottenceau
Create your personal SMS or WAP Service - visit http://mobilefriends.ch/

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

Предыдущее
От: Arnaud Lesauvage
Дата:
Сообщение: Re: Poor performance on very simple query ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Poor performance on very simple query ?