From: | Jonathan Bartlett <johnnyb(at)eskimo(dot)com> |
---|---|
To: | Sven Koehler <skoehler(at)upb(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: full featured alter table? |
Date: | 2003-06-12 14:26:49 |
Message-ID: | Pine.GSU.4.44.0306120725420.2239-100000@eskimo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)postgresql(dot)org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Dennis Gearon | 2003-06-12 14:27:57 | Re: How to change column type in PostgreSQL 7.1.2 |
Previous Message | Sven Koehler | 2003-06-12 14:20:16 | full featured alter table? |