Skip site navigation (1) Skip section navigation (2)

Re: Clarification, please

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mladen Gogala <mladen(dot)gogala(at)vmsinfo(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org >> \"pgsql-novice(at)postgresql(dot)org\"" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Clarification, please
Date: 2010-12-01 17:34:53
Message-ID: 18462.1291224893@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Mladen Gogala <mladen(dot)gogala(at)vmsinfo(dot)com> writes:
> I agree with you. I was only wandering how was it done with a unique index.

Maybe the point you're missing is that PG unique indexes aren't unique
in the sense of it being physically impossible to represent duplicate
keys.  The uniqueness property just means that there's a check that
throws error instead of allowing a live duplicate to be inserted.
(Dead duplicates are OK --- in particular, we have to allow multiple
nominal duplicates to support MVCC, since an update requires a new
physical table entry and hence a new index entry pointing at it, in
most cases.)

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Pushpendra Singh ThakurDate: 2010-12-01 21:05:31
Subject: Hot standby
Previous:From: Mladen GogalaDate: 2010-12-01 17:28:17
Subject: Re: Clarification, please

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group