Re: Alter Column - Mailing list pgsql-novice

From Michael Fuhr
Subject Re: Alter Column
Date
Msg-id 20041027085823.GA51684@winnie.fuhr.org
Whole thread Raw
In response to Alter Column  (Steve Tucknott <steve@retsol.co.uk>)
List pgsql-novice
On Wed, Oct 27, 2004 at 09:43:43AM +0100, Steve Tucknott wrote:
> PostgreSQL 7.4.5
>
> Is there a simple way of altering the definition of a column?
>
> Say I have a column defined as CHAR(5) and I want to make that CHAR(10)
> NOT NULL - apart from creating a second table and copying the table,
> dropping the original and renaming the copy.

This is answered in the FAQ:

http://www.postgresql.org/docs/faqs/FAQ.html#4.4

> What I am hoping for is 'yes, V8 has ALTER TABLE MODIFY (colName
> definition) '  ;-)

In 8.0 you can change a column's type with ALTER TABLE.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-novice by date:

Previous
From: Steve Tucknott
Date:
Subject: Alter Column
Next
From: ishaame@bluewin.ch
Date:
Subject: Re: Cannot Create tables - on Windows XP