Re: a problem - Mailing list pgsql-general

From Franco Bruno Borghesi
Subject Re: a problem
Date
Msg-id 1061994546.825.12.camel@taz.oficina
Whole thread Raw
In response to a problem  (sharvari N <sharvari_n@yahoo.com>)
List 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
Attachment

pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: Re: Linux ready for high-volume databases?
Next
From: Christian Traber
Date:
Subject: Re: pgplsql - Oracle nvl