RE: Change varchar lenght

From: "Sykora, Dale" <Dale(dot)Sykora(at)compaq(dot)com>
To: "'Eduardo'" <ekotuja(at)brasilnet(dot)net>, pgsql-novice(at)postgresql(dot)org
Subject: RE: Change varchar lenght
Date: 2000-09-11 22:18:17
Message-ID: 415DD0BB9FAFD011B6E700805FBEB68E057783D4@exchou-ca0801bk.im.hou.compaq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Eduardo,

Since you are changing the table definition, I would do the following.
1. Make a temp table "identical to the original table1 except for the larger
varchar size."
2. Copy table1 to the temp table.
3. Drop table1.
4. Create new table1 identical to temp table.
5. Copy temp table to table1.
6. Drop temp table.

I am a fairly new user, so there may be a better way to do this.

Good Luck,
dale(dot)sykora(at)compaq(dot)com

-----Original Message-----
From: Eduardo [mailto:ekotuja(at)brasilnet(dot)net]
Sent: Monday, September 11, 2000 3:17 PM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] Change varchar lenght

How can I change a field that is varchar(50) to varchar(500) ??
I did not find in docs. And did not find that option in pgaccess .

Thanks,
Eduardo K

Browse pgsql-novice by date

  From Date Subject
Next Message Dan Browning 2000-09-11 23:34:52 Removing all instances of "NOT NULL" from an entire directory of files
Previous Message Eduardo 2000-09-11 20:16:48 Change varchar lenght