Re: Modifying column size

From: "Susan Lane" <suel(at)dpn(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Modifying column size
Date: 2002-07-19 22:10:54
Message-ID: aha3hr$1bnm$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com> wrote in message
news:20020719150925(dot)D85491-100000(at)megazone23(dot)bigpanda(dot)com(dot)(dot)(dot)
> In general, not really (as per other answers).
>
> For the specific cases of varchar of one size to varchar of a larger size,
> you can do so with some system table hacking. In general, unless you've
> got constraints/views/etc to prevent you from making a new table, copying
> the data and renaming, I'd suggest against it. (If you really want to
> know, you can ask about it specifically or better yet, check the archives
> :) )

Thanks to everyone for the quick responses!

What I ended up doing is dumping the data, dropping the table (which created
problems, since I had constraints), recreating the table with my changed
varchar size, and restoring the data. I think the suggestion to create a
new table and copying it over is a better solution.....I will still have to
deal with my constraints, but at least there are less steps! :)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Susan Lane 2002-07-19 22:12:01 Re: COMMIT in PostgreSQL
Previous Message Andrew Sullivan 2002-07-19 22:02:55 Re: brk() function and performance