Re: logical column position - Mailing list pgsql-hackers

From Andreas Pflug
Subject Re: logical column position
Date
Msg-id 3FBE6190.9000608@pse-consulting.de
Whole thread Raw
In response to Re: logical column position  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

>If the ALTER is changing the column type, it's not really the same
>column anymore;
>

This doesn't strike. "If the ALTER is changing the number of columns, 
it's not really the same table anymore" is as true as your statement. 
Still, pg_class.oid remains the same for ADD and DROP column.

> I see nothing wrong with assigning a new attnum in that
>scenario.  It's not like you can simply change the type and not go visit
>the references in such a case.
>  
>

But this fix is about automatically updating references as well, making 
the ALTER COLUMN appear a low-impact change to the user (which obviously 
isn't true, unless my proposed shortcut for binary compatible type 
changes is implemented).

When dropping and recreating an object, nobody would expect to get the 
same identifier. When altering, I *do* expect the identifier to remain 
the same.

Regards,
Andreas




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: logical column position
Next
From: Tom Lane
Date:
Subject: Re: Release cycle length