Обсуждение: AW: AW: AW: ALTER TABLE DROP COLUMN
> Hiroshi's patch would make for a good starting point by bringing in the > ability to do the DROP COLUMN feature, as I understand, without the > rollback capability, No Hiroshi's patch is rollback enabled, simply because all it does is change some system tables. It only does not free space that is used by "old" phantom columns. This cleanup would need extra work, but for now, I guess it would be fine to simply say that if you want to regain the space create a new table and move the data. Andreas
On Fri, 13 Oct 2000, Zeugswetter Andreas SB wrote: > > > Hiroshi's patch would make for a good starting point by bringing in the > > ability to do the DROP COLUMN feature, as I understand, without the > > rollback capability, > > No Hiroshi's patch is rollback enabled, simply because all it does is > change some system tables. It only does not free space that is used by > "old" phantom columns. This cleanup would need extra work, but for > now, I guess it would be fine to simply say that if you want to regain > the space create a new table and move the data. okay, but, again based on my impression of what Tom has stated, and previous conversations on this topic, the key problem is what happens if I drop a column and a later date decide add a new column of the same name, what happens? I *believe* its that condition that Tom's thought about physical vs logical column names was about ... Tom?
The Hermit Hacker <scrappy@hub.org> writes: > okay, but, again based on my impression of what Tom has stated, and > previous conversations on this topic, the key problem is what happens if I > drop a column and a later date decide add a new column of the same name, > what happens? I'm not very worried about that --- presumably the old column is either marked as dead or gone entirely from pg_attribute, so why should there be any confusion? regards, tom lane
On Fri, 13 Oct 2000, Tom Lane wrote: > The Hermit Hacker <scrappy@hub.org> writes: > > okay, but, again based on my impression of what Tom has stated, and > > previous conversations on this topic, the key problem is what happens if I > > drop a column and a later date decide add a new column of the same name, > > what happens? > > I'm not very worried about that --- presumably the old column is either > marked as dead or gone entirely from pg_attribute, so why should there > be any confusion? right, but, if you add a column after it was previuosly marked dead, does it then create a second column in pg_attribute with that same name? *raised eyebrow*