[OT] why not keeping the original column name in catalog after a drop?

From: Luca Ferrari <fluca1978(at)infinito(dot)it>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [OT] why not keeping the original column name in catalog after a drop?
Date: 2013-11-13 07:52:27
Message-ID: CAKoxK+48=7tLkc=hFOWZ6U6JCS2iR6x-92ggM06rxpYc1qkmgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,
when you drop a column on a table the pg_attribute is updated and the
name of the column is changed with an almost fixed identifier that
reports only the original column position:

/*
* Change the column name to something that isn't likely to conflict
*/
snprintf(newattname, sizeof(newattname),
"........pg.dropped.%d........", attnum);
namestrcpy(&(attStruct->attname), newattname);

I'm wondering what is the problem in placing the old/original name
after the "pg.dropped" prefix. I know that the tuple in pg_attribute
is temporary, but what are the possible conflicts the comment talks
about?

Thanks,
Luca

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2013-11-13 07:59:14 Re: [OT] why not keeping the original column name in catalog after a drop?
Previous Message Andres Freund 2013-11-13 07:51:39 Re: [PATCH] pgbench various mods for high volume testing