Re: [HACKERS] Need help understanding unique indices (fwd) - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] Need help understanding unique indices (fwd)
Date
Msg-id 358A7A13.C80504F5@krs.ru
Whole thread Raw
In response to RE: [HACKERS] Need help understanding unique indices (fwd)  (Marc Howard Zuckman <marc@fallon.classyad.com>)
List 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

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] RedHat 5.1 Postgres 6.3.2 problem resolved
Next
From: Bruce Momjian
Date:
Subject: Re: [BUGS] Re: [HACKERS] pg_dump error