Skip site navigation (1) Skip section navigation (2)

Re: Alter Column

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
Cc: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Alter Column
Date: 2004-10-27 08:58:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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:

> 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

In response to

pgsql-novice by date

Next:From: ishaameDate: 2004-10-27 09:33:29
Subject: Re: Cannot Create tables - on Windows XP
Previous:From: Steve TucknottDate: 2004-10-27 08:43:43
Subject: Alter Column

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group