how to change column type

From: Fernan Aguero <fernan(at)iib(dot)unsam(dot)edu(dot)ar>
To: pgsql-general(at)postgresql(dot)org
Subject: how to change column type
Date: 2000-11-03 18:09:44
Message-ID: 20001103150944.A15510@iib005.iib.unsam.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Situation: I wanted to add a column to a table and after adding the column
i realized that i would like to change the type of the column from
varchar(n) to just char (1 character).
The column does not hold any data yet (it is empty), so changing the type
should not pose any problem.
The problem is that I don't seem to find how to do it without dumping the
table contents, recreating the table and getting the data into the table
again. There seems to be no 'ALTER TABLE DROP column' or similar.

Thanks in advance for your help.

--

# --------------------------------------------------------- #
# _ #
# Fernan Aguero | / \ #
# Bioinformatics | ASCII \ / against #
# IIB-UNSAM | ribbon / HTML #
# fernan(at)iib(dot)unsam(dot)edu(dot)ar | campaign / \ email #
# #
# --------------------------------------------------------- #

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2000-11-03 18:45:54 Re: Re: [HACKERS] OSDN Database conference report (long)
Previous Message Tom Lane 2000-11-03 17:29:11 Re: Postgres not finding tables