BUG #12752: example SQL - Mailing list pgsql-bugs

From Gianni Ciolli
Subject BUG #12752: example SQL
Date
Msg-id 20150209163143.GC24192@756b4.gi.lan
Whole thread Raw
List pgsql-bugs
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)

pgsql-bugs by date:

Previous
From: gianni.ciolli@2ndquadrant.it
Date:
Subject: BUG #12752: Regression in ALTER TABLE RENAME COLUMN
Next
From: Tom Lane
Date:
Subject: Re: BUG #12752: Regression in ALTER TABLE RENAME COLUMN