Received: from s3x.moon.ro (s3x.moon.ro [212.35.136.3]) by hub.org (8.9.3/8.9.3) with ESMTP id FAA89846 for ; Mon, 23 Aug 1999 05:20:39 -0400 (EDT) (envelope-from barbos@moon.ro) Received: from gigell (ppplink10.moon.ro [212.35.136.74]) by s3x.moon.ro (8.9.3/8.9.0) with SMTP id MAA13979; Mon, 23 Aug 1999 12:21:52 +0300 Message-ID: <000201beed47$f7dbf140$4a8823d4@gigell> From: "Mihai Barbos" To: "Tom Lane" Cc: Subject: Re: [SQL] UNIQUE constraint Date: Sat, 21 Aug 1999 18:01:02 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 My fault, the correct situation is create table TEST ( testkey something PRIMARY KEY, testval something UNIQUE, ..................... ); PRIMARY KEY works OK, but UNIQUE is ignored. -----Original Message----- From: Tom Lane To: Mihai Barbos Cc: pgsql-sql@hub.org Date: Thursday, August 12, 1999 4:25 PM Subject: Re: [SQL] UNIQUE constraint >"Mihai Barbos" 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 >