BUG #12752: example SQL

From: Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #12752: example SQL
Date: 2015-02-09 16:31:43
Message-ID: 20150209163143.GC24192@756b4.gi.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)ciolli(at)2ndquadrant(dot)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)

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-02-09 17:49:38 Re: BUG #12752: Regression in ALTER TABLE RENAME COLUMN
Previous Message gianni.ciolli 2015-02-09 16:02:15 BUG #12752: Regression in ALTER TABLE RENAME COLUMN