pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Cottenceau <gc@mnc.ch>
To: Tobias Brox <tobias@nordicbet.com>
Cc: Arnaud Lesauvage <thewild@freesurf.fr>
Cc: pgsql-performance@postgresql.org
Subject: Re: Poor performance on very simple query ?
Date: 03 Oct 2006 14:27:40 +0200
Message-ID: <87zmcdposj.fsf@meuh.mnc.lan> (raw)
In-Reply-To: <20061003121709.GF30211@oppetid.no>
References: <45224896.7040708@freesurf.fr>
	<20061003121004.GC30211@oppetid.no>
	<20061003121109.GD30211@oppetid.no>
	<45225407.7090805@freesurf.fr>
	<20061003121709.GF30211@oppetid.no>

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/



view thread (14+ messages)  latest in thread

Message-ID: <87zmcdposj.fsf@meuh.mnc.lan>
Permalink:  ../87zmcdposj.fsf@meuh.mnc.lan/
Also on:    postgresql.org/message-id/87zmcdposj.fsf@meuh.mnc.lan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gc@mnc.ch, tobias@nordicbet.com, thewild@freesurf.fr
  Subject: Re: Poor performance on very simple query ?
  In-Reply-To: <87zmcdposj.fsf@meuh.mnc.lan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox