Re: When the locially dropped column is also physically dropped

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: When the locially dropped column is also physically dropped
Date: 2007-04-30 20:01:57
Message-ID: 60k5vtfx6y.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

rupesh(dot)bajaj(at)gmail(dot)com ("rupesh bajaj") writes:
> Hi, I have dropped a column (say column name is 'A') from the
> relation R. By setting the attisdropped as true in the
> pg_catalog.pg_attribute table. But the column is dropped locially
> not the physically. Can you please tell me when this column will be
> physically also dropped. Is this column is automatically physically
> dropped? or I have to run some command to dropped it physically.

Ron's comment is well-suggested[1], but a bit of a red herring, as the
column will *NEVER* be "physically dropped." [2]

What will happen is that new tuples will not have the column, but old
tuples will continue to have the (invisible) column for as long as
they "live" in the database.

Footnotes:

[1] Ron Johnson, Jr suggested "Why didn't you drop the column the
proper way?"

[2] When a column is dropped via ALTER TABLE DROP COLUMN, the effect
in fact is much the same as what you did; the attribute is marked as
dropped.
--
let name="cbbrowne" and tld="linuxdatabases.info" in name ^ "@" ^ tld;;
http://linuxdatabases.info/info/wp.html
"MICROS~1: The People who Brought the Y2K Bug into Software Titling"
-- cbbrowne(at)hex(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ted Byers 2007-04-30 20:05:25 Re: Temporal Units
Previous Message Erik Jones 2007-04-30 19:45:10 Re: pgsql and Mac OS X

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Browne 2007-04-30 20:03:35 Re: Feature freeze progress report
Previous Message Andrew Dunstan 2007-04-30 19:08:22 Re: Feature freeze progress report