Thread: BUG #6485: Primary index key not updated uniformly
The following bug has been logged on the website: Bug reference: 6485 Logged by: Ramanujam Email address: innomotive@gmail.com PostgreSQL version: 9.0.3 Operating system: Windows 7 Home Premium Description:=20=20=20=20=20=20=20=20 Primary key information in pg_attribute table is not updated when a column name is renamed. Command used: ALTER TABLE table_name RENAME COLUMN old_column TO new_column Entries in pg_attribute still carries old_column.
innomotive@gmail.com writes: > Primary key information in pg_attribute table is not updated when a column > name is renamed. This is intentional --- we gave up updating index column names awhile ago. regards, tom lane
On Thu, Feb 23, 2012 at 3:22 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > innomotive@gmail.com writes: > > This is intentional --- we gave up updating index column names awhile > ago. Is pg_constraint a credible place to retrieve primary key information from?
Ramanujam <innomotive@gmail.com> writes: > On Thu, Feb 23, 2012 at 3:22 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> This is intentional --- we gave up updating index column names awhile >> ago. > Is pg_constraint a credible place to retrieve primary key information from? I'd try the information_schema views first. regards, tom lane