Re: Poor performance on very simple query ?

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: Tobias Brox <tobias(at)nordicbet(dot)com>
Cc: Arnaud Lesauvage <thewild(at)freesurf(dot)fr>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Poor performance on very simple query ?
Date: 2006-10-03 12:27:40
Message-ID: 87zmcdposj.fsf@meuh.mnc.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-10-03 14:35:13 Re: Poor performance on very simple query ?
Previous Message Arnaud Lesauvage 2006-10-03 12:25:28 Re: Poor performance on very simple query ?