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

Re: [HACKERS] Need help understanding unique indices (fwd)

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: Marc Howard Zuckman <marc(at)fallon(dot)classyad(dot)com>
Cc: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Need help understanding unique indices (fwd)
Date: 1998-06-19 14:47:47
Message-ID: 358A7A13.C80504F5@krs.ru (view raw or flat)
Thread:
Lists: pgsql-hackers
Marc Howard Zuckman wrote:
> 
> While this query makes just as much sense as the ones that I tried,
> it also fails on my database.  Once again, I do not understand why.
> Bug???
> 
> realestate=> begin;
> BEGIN
> realestate=> INSERT INTO propsales
> realestate-> SELECT n.*
> realestate->   FROM newpropsales AS n
> realestate->  WHERE NOT EXISTS (SELECT p.*
> realestate->                      FROM propsales AS p
> realestate->                     WHERE n.city = p.city AND
> realestate->                           n.street = p.street AND
> realestate->                           n.streetno = p.streetno AND
> realestate->                           n.county = p.county AND
> realestate->                           n.closingdate = p.closingdate);
> ERROR:  Cannot insert a duplicate key into a unique index

I can't reproduce this! (6.3.2 on Solaris 2.5 (sparc),
6.4-current on FreeBSD 2.2.6)

Vadim

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-06-20 02:49:42
Subject: Re: [BUGS] Re: [HACKERS] pg_dump error
Previous:From: The Hermit HackerDate: 1998-06-19 11:38:53
Subject: Re: [HACKERS] RedHat 5.1 Postgres 6.3.2 problem resolved

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