Mladen Gogala wrote:
> How is it possible to insert the same value twice into a UNIQUE
> index?
You get multiple entries for the same value in a UNIQUE indexes all
the time in PostgreSQL. Any non-HOT update of a table with a UNIQUE
index will cause that. You just can't have duplicate entries
Richard Broersma wrote:
It looks like the check isn't preformed until COMMIT.
So, the index is not actually updated until commit? H, that seems
unlikely.
--
Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com
The Leader in Integrated
On Wed, Dec 1, 2010 at 8:46 AM, Mladen Gogala wrote:
> PostgreSQL 9.0, however, creates a unique index:
>
> scott=# create table test1
> scott-# (col1 integer,
> scott(# constraint test1_pk primary key(col1) deferrable);
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
>
In Oracle, deferrable primary keys are enforced by non-unique indexes.
That seems logical, because index should tolerate duplicate values for
the duration of transaction:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, D