Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
> To put it differently: a ALTER COLUMN command may never-ever change the
> identifier of the column, i.e. attrelid/attnum.
If the ALTER is changing the column type, it's not really the same
column anymore; 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.
regards, tom lane