X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9D030475A45 for ; Wed, 16 Apr 2003 01:54:36 -0400 (EDT) Received: from water.oasis.net.au (water.oasis.net.au [210.8.139.2]) by postgresql.org (Postfix) with ESMTP id F134E4758F1 for ; Wed, 16 Apr 2003 01:54:34 -0400 (EDT) Received: from oasis.net.au (guardian [210.8.139.5]) by water.oasis.net.au (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id PAA28613; Wed, 16 Apr 2003 15:58:21 +1000 X-Authentication-Warning: water.oasis.net.au: Host guardian [210.8.139.5] claimed to be oasis.net.au Message-ID: <3E9CF0DB.60509@oasis.net.au> Date: Wed, 16 Apr 2003 15:57:47 +1000 From: Rudi Starcevic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pginfo Cc: pgsql-sql@postgresql.org Subject: Re: changing column size and type. References: <3E9C155B.7A694675@t1.unisoftbg.com> <000401c303a4$b2d88500$7308a18e@cleartag> <3E9CDF76.C2B2D50@t1.unisoftbg.com> In-Reply-To: <3E9CDF76.C2B2D50@t1.unisoftbg.com> Content-Type: multipart/alternative; boundary="------------070201040703040109010407" X-Spam-Status: No, hits=-34.6 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,HTML_20_30,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MOZILLA_UA,X_AUTH_WARNING 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/249 X-Sequence-Number: 12950 This is a multi-part message in MIME format. --------------070201040703040109010407 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ivan, This link show's how to do it online. http://www.edoceo.com/liberum/default.php?doc=postgresql-tricks There are other links around too. Cheers Rudi pginfo wrote: >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 >>> >>> >>> > > >---------------------------(end of broadcast)--------------------------- >TIP 5: Have you checked our extensive FAQ? > >http://www.postgresql.org/docs/faqs/FAQ.html > > > --------------070201040703040109010407 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Ivan,

This link show's how to do it online.

http://www.edoceo.com/liberum/default.php?doc=postgresql-tricks

There are other links around too.

Cheers
Rudi


pginfo wrote:
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" <pginfo@t1.unisoftbg.com>
To: <pgsql-sql@postgresql.org>
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

      


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

  

--------------070201040703040109010407--