Re: varchat ->text

From: Richard Huxton <dev(at)archonet(dot)com>
To: Aristide Aragon <aristide(at)lionking(dot)org>, aristide(at)mexred(dot)net(dot)mx
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: varchat ->text
Date: 2001-03-13 07:50:32
Message-ID: 3AADD149.9C04422B@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Aristide Aragon wrote:
>
[snip]
> I need, then, to convert my tables from varchar to text, but I don't find a way to do it. ALTER TABLE table ALTER column seems to only be able to modify the default value, not the data type. I also don't see an ALTER TABLE DROP COLUMN, so that I could drop the varchar column and then add a text one.
> Is there a way to do what I need without having to drop all the tables?
>
Quickest way is to use pg_dump with the table definitions (-s iirc) then
use your favourite text editor to do a bit of search & replace then re-import.

- Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2001-03-13 07:56:38 Re: help with simple rule
Previous Message Richard Huxton 2001-03-13 07:46:40 Re: Re: Anyone can create tables!