Please find below some code that reproduces the bug.
In the report I was off by one: on my system the bug can be reproduced
on 9.0 or later, but not on 8.4. Sorry for the mistake!
Best wishes,
Dr. Gianni Ciolli - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gianni.ciolli@2ndquadrant.it | www.2ndquadrant.it
---8<------8<------8<------8<------8<------8<------8<------8<------8<---
gianni=# CREATE TABLE t(oldname int primary key);
CREATE TABLE
gianni=# ALTER TABLE t rename column oldname to newname;
ALTER TABLE
gianni=# \d t_pkey
Index "public.t_pkey"
Column | Type | Definition
---------+---------+------------
oldname | integer | newname
primary key, btree, for table "public.t"
gianni=# SELECT attname FROM pg_attribute WHERE attrelid = regclass 't_pkey';
attname
---------
oldname
(1 row)