Composite Unique Key - Doubt

From: Technical Doubts <online(dot)technicaldoubts(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Composite Unique Key - Doubt
Date: 2013-06-20 05:56:51
Message-ID: CAJyuQsG6C3m846-mPpuipf3mL55KYfRZ-a+QaGZOx9RiGS2WTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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-novice by date

  From Date Subject
Next Message Vibhor Kumar 2013-06-20 19:08:50 Re: Composite Unique Key - Doubt
Previous Message LeoTh3o 2013-06-17 08:50:25 Re: Postgresql iPhone