X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D02FCD1B95A; Wed, 27 Aug 2003 11:27:13 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 10602-10; Wed, 27 Aug 2003 11:26:45 -0300 (ADT) Received: from lucifer.akyasociados.com.ar (unknown [200.69.203.237]) by svr1.postgresql.org (Postfix) with ESMTP id AACEDD1B8E7; Wed, 27 Aug 2003 11:26:40 -0300 (ADT) Received: from taz.oficina (taz.oficina [192.168.1.174]) (authenticated bits=0) by lucifer.akyasociados.com.ar (8.12.9/8.12.9) with ESMTP id h7REVlkC021033; Wed, 27 Aug 2003 11:31:48 -0300 (ART) (envelope-from franco@akyasociados.com.ar) Subject: Re: [GENERAL] a problem From: Franco Bruno Borghesi To: sharvari N Cc: pgsql-admin@postgresql.org, pgsql-general@postgresql.org In-Reply-To: <20030822090113.90339.qmail@web40107.mail.yahoo.com> References: <20030822090113.90339.qmail@web40107.mail.yahoo.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-pN3VL+jttMIiT5TBDCO4" Organization: AK y Asociados S.R.L. Message-Id: <1061994546.825.12.camel@taz.oficina> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 27 Aug 2003 11:29:07 -0300 X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/317 X-Sequence-Number: 10038 --=-pN3VL+jttMIiT5TBDCO4 Content-Type: multipart/alternative; boundary="=-7Vms5DwyHshoRn5sJ78h" --=-7Vms5DwyHshoRn5sJ78h Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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(); UPDATE foo SET bar=3Dbar_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.=20 > regards > sharvari >=20 >=20 > ______________________________________________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software --=-7Vms5DwyHshoRn5sJ78h Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=3Dbar_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 wi= dth 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 th= em 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

=20=20=20=20
Do you Yahoo!?

Yahoo! SiteBuilder - Free, easy-to= -use web site design software
--=-7Vms5DwyHshoRn5sJ78h-- --=-pN3VL+jttMIiT5TBDCO4 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA/TMAy21dVnhLsBV0RAsPlAJ9daI3WcLPB3TuYlV5Hae1aySKZPgCfZugs GhOhm0lPuseJpHSxMHn6QnE= =AARU -----END PGP SIGNATURE----- --=-pN3VL+jttMIiT5TBDCO4--