On 05 Jul 2001 11:09:29 +0200, Giorgio A. wrote:
> hi, i have this very lame problem: i created a column as varchar(15) but now
> i need to have more than 15 char... how can i change this ? changing it into
> "text" will also be good !
You can't change the type of fields.
You could create a new table with proper cols and 'INSERT INTO newtable
SELECT * FROM oldtable;DROP TABLE oldtable;ALTER TABLE newtable RENAME
TO oldtable;' or something like that.
This leaves you in a mess if there are triggers involved (references
I would suggest you 'pg_dump -D dbname > db.sql' modify the table
definitions, 'dropdb dbname;createdb dbname;psql dbname -f db.sql'
(If you can live with a short downtime and loosing some information like
oids, but that should be irrelevant in most cases)
In response to
pgsql-novice by date
|Next:||From: Kristensen Poul||Date: 2001-07-05 12:47:43|
|Subject: RE: Only 350 inserts(should be1000) at a time to postpgres(or mysql) using odbc(win) ...|
|Previous:||From: Nabil Sayegh||Date: 2001-07-05 11:22:42|
|Subject: Re: User Management|