Обсуждение: AW: AW: AW: ALTER TABLE DROP COLUMN

Поиск
Список
Период
Сортировка

AW: AW: AW: ALTER TABLE DROP COLUMN

От
Zeugswetter Andreas SB
Дата:
> 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


Re: AW: AW: AW: ALTER TABLE DROP COLUMN

От
The Hermit Hacker
Дата:
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?




Re: AW: AW: AW: ALTER TABLE DROP COLUMN

От
Tom Lane
Дата:
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


Re: AW: AW: AW: ALTER TABLE DROP COLUMN

От
The Hermit Hacker
Дата:
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*