Re: full featured alter table? - Mailing list pgsql-general

From Jonathan Bartlett
Subject Re: full featured alter table?
Date
Msg-id Pine.GSU.4.44.0306120725420.2239-100000@eskimo.com
Whole thread Raw
In response to full featured alter table?  (Sven Koehler <skoehler@upb.de>)
Responses Re: full featured alter table?  (Sven Koehler <skoehler@upb.de>)
List pgsql-general
The process you describe really is not that difficult.  My general method
is:

Rename existing column
Create new column
Repopulate from existing column
Drop existing column
Re-Add constraints/indexes (honestly I don't use constraints that much).

Jon

On Thu, 12 Jun 2003, Sven Koehler wrote:

> Hi,
>
> one of the biggest disease of PostGreSQL is, that i can't change the
> definition of a column.
>
> In order to do that, i'd have to drop any keys, drop the column and
> create a new one with all indexes etc.
>
> Are there any plans to overcome that problem?
> Even simple changes like varchar(20) to varchar(200) are not allowed.
>
> I asked this question about 2 years ago, and there were only some guys,
> that told me that i wouldn't need to change my DB if i'd plan it well.
>
> So my DB is planned well, but i have to change it every now and than
> because i must implement the changes that my client demands me to do,
> and have some extra work that nobody will pay me for, if there's no way
> to change a column.
>
> This is the only missing feature, that prevent me to use this DBMS - i'd
> love to, because it's an ORDBMS and that's what i'd have needed sometimes.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


pgsql-general by date:

Previous
From: Sven Koehler
Date:
Subject: full featured alter table?
Next
From: Dennis Gearon
Date:
Subject: Re: How to change column type in PostgreSQL 7.1.2