Re: When the locially dropped column is also physically dropped - Mailing list pgsql-general

From Chris Browne
Subject Re: When the locially dropped column is also physically dropped
Date
Msg-id 60k5vtfx6y.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to When the locially dropped column is also physically dropped  ("rupesh bajaj" <rupesh.bajaj@gmail.com>)
Responses Re: When the locially dropped column is also physically dropped  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
rupesh.bajaj@gmail.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@hex.net

pgsql-general by date:

Previous
From: Erik Jones
Date:
Subject: Re: pgsql and Mac OS X
Next
From: Tom Allison
Date:
Subject: Re: pgsql and Mac OS X