Discussion:
changing the size of a varchar column
(too old to reply)
Warren Little
2004-09-08 16:45:43 UTC
Permalink
Hello,
Does pg7.4.x support resizing a varchar column
ie varchar(30) -> varchar(200)

If not does the feature in 8.0 relating to changing column types support
this?

thx
--
Warren Little
Senior Vice President
Secondary Markets and IT Manager
Security Lending Wholesale, LC
www.securitylending.com
Tel: 866-369-7763
Fax: 866-849-8079
Scott Marlowe
2004-09-08 17:22:08 UTC
Permalink
Post by Warren Little
Hello,
Does pg7.4.x support resizing a varchar column
ie varchar(30) -> varchar(200)
No, but some folks have done it by hacking the catalogs. not
recommended, make a backup, etc...
Post by Warren Little
If not does the feature in 8.0 relating to changing column types
support this?
Yes.


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

http://www.postgresql.org/docs/faqs/FAQ.html
Tsirkin Evgeny
2004-09-08 21:34:52 UTC
Permalink
Maybe you already know this but the solution is to create a new
table with varchar(200) copy to it the data from the old one.
Then drop the old one and recreate with varchar(200) then copy
the data back from the tmp table.
Again you probably know all this ,just trying to help...
Post by Scott Marlowe
Post by Warren Little
Hello,
Does pg7.4.x support resizing a varchar column
ie varchar(30) -> varchar(200)
No, but some folks have done it by hacking the catalogs. not
recommended, make a backup, etc...
Post by Warren Little
If not does the feature in 8.0 relating to changing column types
support this?
Yes.
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
--
Evgeny.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
Loading...