View Single Post

   
  #2 (permalink)  
Old 04-10-2008, 11:14 AM
Euler Taveira de Oliveira
 
Posts: n/a
Default Re: BUG #3891: Multiple UPDATE doesn't handle UNIQUE constraintcorrectly

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/g...006/06/10.html


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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote