From: George Weaver <georgew1@mts.net>
To: pginfo <pginfo@t1.unisoftbg.com>
To: pgsql-sql@postgresql.org
Subject: Re: changing column size and type.
Date: Tue, 15 Apr 2003 18:13:09 -0500
Message-ID: <000401c303a4$b2d88500$7308a18e@cleartag> (raw)
References: <3E9C155B.7A694675@t1.unisoftbg.com>
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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: georgew1@mts.net, pginfo@t1.unisoftbg.com
Subject: Re: changing column size and type.
In-Reply-To: <000401c303a4$b2d88500$7308a18e@cleartag>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox