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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: update impossible, constraint prevents it but it shouldn't



On Mon, Jun 26, 2006 at 01:00:19PM +0200, lrotger wrote:
> I run the following query:
> 
> update personal set closed_date = flt_date + 20
> from enr inner join personal p on enr.id = p.id_enr
> where (...columns from enr, columns from personal...)

I think your problem is that "personal" and "personal p" refer to
different instances of the same table. Use EXPLAIN to check how many
times "personal" appears in the resulting query.

Oh yeah, 7.2 will eat your data eventually, you have been warned.
Please upgrade to something newer.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog(at)svana(dot)org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group