Re: how to chane the type

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: tinar <tinarajraj(at)hotmail(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: how to chane the type
Date: 2001-12-06 16:31:09
Message-ID: 20011206082604.Y25449-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql


On Wed, 5 Dec 2001, tinar wrote:

> i have created a table
> userlist with fields username varchar(10)
> now i want to change it to username varchar(30)
> without dropping or recreating the table.
> how do i do it?

The best way is to recreate the table and rename
them around. If you *REALLY* don't want to do
that and have a recent backup (yes, I'm serious),
you can muck with pg_attribute and change
atttypmod for the attribute in question
(from 14 to 34).

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-12-06 16:39:11 Re: date formatting and tab-complete patch
Previous Message Stephan Szabo 2001-12-06 15:59:10 Re: pg_dump: Sorted output, referential integrity statements

Browse pgsql-sql by date

  From Date Subject
Next Message Gregory Wood 2001-12-06 18:24:14 Re: update returns 1, but no changes have been made
Previous Message Stephan Szabo 2001-12-06 16:25:11 Re: need some help understanding sloq query