Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group