Re: BUG #3891: Multiple UPDATE doesn't handle UNIQUE constraint correctly - Mailing list pgsql-bugs

From Euler Taveira de Oliveira
Subject Re: BUG #3891: Multiple UPDATE doesn't handle UNIQUE constraint correctly
Date
Msg-id 4794917F.8060703@timbira.com
Whole thread Raw
In response to BUG #3891: Multiple UPDATE doesn't handle UNIQUE constraint correctly  ("Adriaan van Os" <postgres@microbizz.nl>)
List pgsql-bugs
Adriaan van Os wrote:

> This will cause a UNIQUE violation in de middle of the UPDATE statement,
> although after completion of the statement there is no such violation.
>
This is not a bug.

> Although deferred constraints are not yet implemented for Postgres, the docs
> at <http://www.postgresql.org/docs/8.2/static/sql-set-constraints.html>
> state:
>
But I forgot to read this:

"Check and unique constraints are always effectively not deferrable."

It's a known "problem" (TODO item). See Greg's elegant solution [1].

[1]
http://people.planetpostgresql.org/greg/index.php?/archives/2006/06/10.html


--
   Euler Taveira de Oliveira
   http://www.timbira.com/

pgsql-bugs by date:

Previous
From: "Ottó Havasvölgyi"
Date:
Subject: Re: Casting on the limit
Next
From: Magne Mæhre
Date:
Subject: Re: BUG #3892: Invalid week determination