Re: Changing data types - Mailing list pgsql-hackers

From mlw
Subject Re: Changing data types
Date
Msg-id 3BAFDCF6.44609287@mohawksoft.com
Whole thread Raw
In response to Re: Changing data types  ("Gowey, Geoffrey" <ggowey@rxhope.com>)
Responses Re: Changing data types  (Alex Pilosov <alex@pilosoft.com>)
List pgsql-hackers
"Gowey, Geoffrey" wrote:
> 
> >This is not for -hackers.
> 
> How so?
> 
> >And the answer is "no, you can't". Recreate the table with correct types
> >and insert the old values into it.
> 
> You're kidding me, right?  *prepares to gargle* MS Sql server can.  Surely
> we can implement this feature or aren't we aiming to go head to head with
> commercial rdbms'?

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.

Adding a column, updating a column with a conversion routine, dropping the old
column, and renaming the new column to the old column name is probably
supported, but, geez, I have been dealing with SQL for almost 8 years and I
have never needed to do that.


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Unicode combining characters
Next
From: Hiroshi Inoue
Date:
Subject: Re: ODBC driver flakieness