Re: BUG #3891: Multiple UPDATE doesn't handle UNIQUE constraint correctly

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Adriaan van Os <postgres(at)microbizz(dot)nl>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3891: Multiple UPDATE doesn't handle UNIQUE constraint correctly
Date: 2008-01-21 12:35:11
Message-ID: 4794917F.8060703@timbira.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Magne Mæhre 2008-01-21 12:40:23 Re: BUG #3892: Invalid week determination
Previous Message Ottó Havasvölgyi 2008-01-21 11:08:42 Re: Casting on the limit