From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Mihai Barbos" <barbos(at)moon(dot)ro> |
Cc: | pgsql-sql(at)hub(dot)org |
Subject: | Re: [SQL] UNIQUE constraint |
Date: | 1999-08-12 13:23:02 |
Message-ID: | 17727.934464182@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
"Mihai Barbos" <barbos(at)moon(dot)ro> writes:
> Maybe I haven't looked in the roght place but here's my problem:
> I've upgraded to 6.5 and I'm trying to use UNIQUE, something like:
> create table TEST (
> testval something UNIQUE,
> .....................,
> );
> In 6.4.2 it worked OK, but now it seems it has no effect. Is there any
> problem with UNIQUE ?
I don't see any:
create table TEST (
testval int4 UNIQUE
);
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_testval_key' for table 'test'
CREATE
insert into test values (1);
INSERT 283276 1
insert into test values (1);
ERROR: Cannot insert a duplicate key into a unique index
You're going to have to be more specific about what problem you
are observing.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Field | 1999-08-12 13:58:06 | Table size limit? |
Previous Message | Sbastien BOUTELOUP | 1999-08-12 13:05:00 | What return type for an insertion function? |