varchat ->text

From: Aristide Aragon <aristide(at)lionking(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: varchat ->text
Date: 2001-03-12 19:57:21
Message-ID: 20010312135721.A2869@busa.lionking.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello
I created a few tables in a DB and created some varchar rows in them.
I didn't notice then that varchar(n) was an array of max[n] size, actually I thought it was the opposite (a minium of n chars would be allocated, and more if needed). I needed that, and only now I noticed that I could only do what I need with the text data type.
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?

Please reply to aristide(at)mexred(dot)net(dot)mx and aristide(at)lionking(dot)org, for my mail server is down, but the other email address may dissapear soon

Thanks in advance

Aristide

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Hayner 2001-03-12 20:00:14 help with simple rule
Previous Message Mark Stosberg 2001-03-12 18:53:39 FYI: ODP Postgres editor position available