X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3D6FD4758F1 for ; Wed, 16 Apr 2003 01:44:52 -0400 (EDT) Received: from jobs1.unisoftbg.com (unknown [194.12.229.207]) by postgresql.org (Postfix) with SMTP id C6846475458 for ; Wed, 16 Apr 2003 01:44:45 -0400 (EDT) Received: (qmail 6138 invoked from network); 16 Apr 2003 07:18:58 -0000 Received: from unknown (HELO t1.unisoftbg.com) (194.12.229.193) by 0 with SMTP; 16 Apr 2003 07:18:58 -0000 Message-ID: <3E9CDF76.C2B2D50@t1.unisoftbg.com> Date: Wed, 16 Apr 2003 06:43:34 +0200 From: pginfo X-Mailer: Mozilla 4.03 [en] (Win95; I) MIME-Version: 1.0 To: George Weaver Cc: pgsql-sql@postgresql.org Subject: Re: changing column size and type. References: <3E9C155B.7A694675@t1.unisoftbg.com> <000401c303a4$b2d88500$7308a18e@cleartag> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-23.7 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,QUOTED_EMAIL_TEXT,RCVD_IN_DSBL, RCVD_IN_OSIRUSOFT_COM,REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/248 X-Sequence-Number: 12949 Hi George, It is possible to do it so, but I wanted some better solution. For example with oracle I can do it "online". regards, ivan. George Weaver wrote: > Hi Ivan, > > I don't know if this is a recommended practice or not, but you can try the > following. > > Use PgDump to back up the entire database as a text file. Edit the backup > text file and change the CREATE TABLE statement for the table you want to > change, changing the column width to the new width desired. Restore the > database. The database will be restored with the new width for the column > in the table. > > The ability to do this depends on the size of the database, whether it can > be taken off line, etc. etc. > > HTH > George > > ----- Original Message ----- > From: "pginfo" > To: > Sent: Tuesday, April 15, 2003 9:21 AM > Subject: [SQL] changing column size and type. > > > Hi, > > > > I am using pg 7.3.2. > > > > Is it possible to change: > > - column size ot existing table. > > - columnt size ( it is varchar basicaly). > > > > The problem is that the table have many freferences from and to it. > > > > many thanks, > > ivan. > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 5: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/docs/faqs/FAQ.html > >