On Wed, 28 Apr 2004 09:33:34 +0100, Ben Young <ben(at)transversal(dot)com>
>UPDATE temp SET num = num+1;
>ERROR: duplicate key violates unique constraint "temp_num_key"
>Is this [...] a known problem in Posgresql,
> or bug which will be fixed sometime.
If you need a workaround for now, do it in two steps:
UPDATE temp SET num = -num;
UPDATE temp SET num = -num+1;
This assumes you have a range of numbers that is normally not used.
In response to
pgsql-general by date
|Next:||From: Ian Ribas||Date: 2004-04-28 12:11:36|
|Subject: Optimizer choosing smaller index instead of right one|
|Previous:||From: Bogdan Vatkov||Date: 2004-04-28 09:33:15|
|Subject: BUG ? or SQL miss understanding ?|