BUG #6485: Primary index key not updated uniformly

Started by Ramanujamabout 14 years ago4 messagesbugs
Jump to latest
#1Ramanujam
innomotive@gmail.com

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:

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.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ramanujam (#1)
Re: BUG #6485: Primary index key not updated uniformly

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

#3Ramanujam
innomotive@gmail.com
In reply to: Tom Lane (#2)
Re: BUG #6485: Primary index key not updated uniformly

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?

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ramanujam (#3)
Re: BUG #6485: Primary index key not updated uniformly

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