Re: logical column position

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pg(at)fastcrypt(dot)com, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logical column position
Date: 2003-11-21 19:03:44
Message-ID: 3FBE6190.9000608@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-11-21 19:08:28 Re: Release cycle length
Previous Message Tom Lane 2003-11-21 18:50:02 Re: logical column position