Don Baccus wrote:
>
> At 10:20 AM 2/28/00 -0500, Tom Lane wrote:
> >Don Baccus <dhogaza@pacifier.com> writes:
> >>> "update t set id=id+1" is also a 2x space,
> >
> >> And PG doesn't do it correctly anyway...
> >
> >? News to me. What's your definition of "correctly"?
>
> create table foo(i integer unique);
>
> (insert values)
>
> donb=# select * from foo;
> i
> ---
> 1
> 2
> 3
> (3 rows)
>
> donb=# update foo set i=i+1;
> ERROR: Cannot insert a duplicate key into unique index foo_pkey
I knew it used to misbehave that way, but at some point I got the
impression that it was fixed ;(
IIRC, the same behaviour plagued the old foreign key implementation
in contrib, which was why it was refused for a long time to be
integrated.
I hope that at least the foreig keys don't do it anymore.
---------
Hannu