| From: | Franco Bruno Borghesi <franco(at)akyasociados(dot)com(dot)ar> |
|---|---|
| To: | sharvari N <sharvari_n(at)yahoo(dot)com> |
| Cc: | pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: [GENERAL] a problem |
| Date: | 2003-08-27 14:29:07 |
| Message-ID: | 1061994546.825.12.camel@taz.oficina |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin pgsql-general |
if your table is named foo and the field you want to chage is bar, then:
BEGIN;
ALTER TABLE foo RENAME bar TO bar_old;
ALTER TABLE foo ADD bar VARCHAR(<new_size>);
UPDATE foo SET bar=bar_old;
*if everything went ok then*
ALTER TABLE foo DROP bar_old;
COMMIT;
same goes for CHAR data type.
about limitations:
http://www.postgresql.org/users-lounge/limitations.html
On Fri, 2003-08-22 at 06:01, sharvari N wrote:
> hello
> How do i change the definition of a column? one of the columns width
> is not sufficient to store the data. I want to change the width. how
> to do that in postgres? I tried doing alter table + change/modify.
> both of them doesn't work in postgres.
> and what is the maximum size to which a postgres database can grow?
> I have huge data to store.
> regards
> sharvari
>
>
> ______________________________________________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2003-08-27 14:38:02 | Re: postgres hab modification without restarting |
| Previous Message | Andrew Sullivan | 2003-08-27 13:49:06 | Re: postgresql and replication |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | FernAndo | 2003-08-27 14:48:35 | process big |
| Previous Message | Christian Traber | 2003-08-27 14:23:59 | Re: pgplsql - Oracle nvl |