Re: Poor performance on very simple query ? - Mailing list pgsql-performance

From Guillaume Cottenceau
Subject Re: Poor performance on very simple query ?
Date
Msg-id 87zmcdposj.fsf@meuh.mnc.lan
Whole thread Raw
In response to Re: Poor performance on very simple query ?  (Tobias Brox <tobias@nordicbet.com>)
List 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 by date:

Previous
From: Arnaud Lesauvage
Date:
Subject: Re: Poor performance on very simple query ?
Next
From: Tom Lane
Date:
Subject: Re: Poor performance on very simple query ?