From: | "Martin Fandel" <martin(dot)fandel(at)alphyra-evs(dot)de> |
---|---|
To: | chen(at)musc(dot)edu |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: change existing table definition |
Date: | 2005-06-28 15:29:11 |
Message-ID: | 1119972551.18693.3.camel@fandelm.ecommit.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi
ALTER TABLE is only in PostgreSQL 8. But you can create a new table
with varchar(50) and copy the data from the existing into the new
table. How much relation_size has your table? Do you create the
dbsize-functions which are included in the contrib package?
Best regards,
Martin
Am Dienstag, den 28.06.2005, 10:39 -0400 schrieb Chuming Chen:
> Peter Eisentraut wrote:
>
> >Chuming Chen wrote:
> >
> >
> >>How can I change the column definition of an existing table, ie. from
> >>varchar(30) to varchar(50)? Is there any way to add a new column to
> >>an existing table?
> >>
> >>
> >
> >The ALTER TABLE command can do all that. You need version 8.0 or later
> >for some functionality though.
> >
> >
> >
> Is there another way to do it in 7.* ?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Lee Wu | 2005-06-28 15:34:44 | Re: change existing table definition |
Previous Message | Brad Nicholson | 2005-06-28 15:28:08 | Re: change existing table definition |