Re: Changing data types - Mailing list pgsql-hackers

From Alex Pilosov
Subject Re: Changing data types
Date
Msg-id Pine.BSO.4.10.10109242133390.28103-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: Changing data types  (mlw <markw@mohawksoft.com>)
List pgsql-hackers
On Mon, 24 Sep 2001, mlw wrote:

> To be honest I am very surprised that MS SQL supports that, but then
> again Microsoft is so used to doing everything so utterly wrong, they
> have to design all their products with the ability to support
> fundamental design error corrections on the fly.
> 
> I would be surprised if Oracle, DB2, or other "industrial grade"
> databases could do this. Needing to change a column from a varchar to
> an integer is a huge change and a major error in design.
Actually they do. Its not a such a great deal, same as adding a column and
dropping a column. If you can do that, you can do modification of type. 

The sticky thing is dropping a column. There are two options, and
postgresql developers just can't make up their mind :P)

a) keep old column data in database (wasted space, but fast)
b) immediately 'compress' table, removing old data (slow, needs a lot of
space for compression)

Option a) was implemented once, but kludgy, and had a few kinks, and it
was removed. Option b) plain sucks :P)

-alex




pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: ODBC driver flakieness
Next
From: Alex Pilosov
Date:
Subject: Re: Changing data types