BUG #14407: pg_attribute shows old column names for indexes

From: bashtanov(at)imap(dot)cc
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14407: pg_attribute shows old column names for indexes
Date: 2016-11-01 10:22:26
Message-ID: 20161101102226.15988.44326@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14407
Logged by: Alexey Bashtanov
Email address: bashtanov(at)imap(dot)cc
PostgreSQL version: 9.6.1
Operating system: Ubuntu Linux 14.04.4 LTS
Description:

STEPS TO REPRODUCE:
create table tt(a int primary key);
alter table tt rename column a to b;
select attrelid::regclass, attname from pg_attribute where attrelid =
any('{tt,tt_pkey}'::regclass[]) and attnum > 0;

EXPECTED:
attrelid | attname
----------+---------
tt | b
tt_pkey | b

RECEIVED:
attrelid | attname
----------+---------
tt | b
tt_pkey | a

reproduced on 9.4.9, 9.6.1 and master

Regards,
Alexey

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-11-01 13:34:03 Re: BUG #14407: pg_attribute shows old column names for indexes
Previous Message Dilip Kumar 2016-11-01 09:05:58 Re: [BUGS] BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.