Composite Unique Key - Doubt

From: Technical Doubts <online(dot)technicaldoubts(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Composite Unique Key - Doubt
Date: 2013-06-20 07:42:37
Message-ID: CAJyuQsHW0paQSWuy0GhzotvnrVxJf0vZNBWPqeZ8xGz8jo+Q7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Team,

Am using Postgres 9.2

I am having a table

technologies
(
technologyid bigint,
status character(1),
implementeddate date
*CONSTRAINT technologies_uq UNIQUE (technologyid, status, implementeddate)*
)

entering data as

insert into technologies (technologyid,status,implementeddate)
values
(123,'P',null),
(123,'P',null);

2 rows affected.

table accepting duplicate values in spite of composite unique constraint..
where I am doing wrong?

Thanks in advance.

--
John.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Emre Hasegeli 2013-06-20 08:10:11 Re: Composite Unique Key - Doubt
Previous Message Rural Hunter 2013-06-20 01:38:19 Re: Why sequence grant is separated from table?