Skip site navigation (1) Skip section navigation (2)

Re: Duplicate key value error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Duplicate key value error
Date: 2009-04-04 22:58:04
Message-ID: 24655.1238885884@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru> wrote:
>> Is it possible to print which key value is duplicated when 'Duplicate 
>> key value violates unique constraint' occurs? Foreign key violation 
>> error reports such kind of information.

> If no objection, I'd like to submit the patch to the next commit-fest (8.5).

I added this to CommitFest-2009-First.  One comment is that I'd prefer
to refactor this so it's not btree-specific, but could be used by other
index AMs.  I'm not quite sure where to put the code instead, though.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-04-04 23:04:56
Subject: Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT
Previous:From: Tom LaneDate: 2009-04-04 22:25:10
Subject: Re: Review: B-Tree emulation for GIN

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group