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

Re: change existing table definition

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Chuming Chen <chen(at)musc(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: change existing table definition
Date: 2005-06-28 14:31:06
Message-ID: 20050628143106.GA24109@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-admin
On Tue, Jun 28, 2005 at 09:27:32AM -0400, Chuming Chen wrote:
> 
> How can I change the column definition of an existing table, ie. from 
> varchar(30) to varchar(50)? Is there any way to add a new column to an 
> existing table?

See ALTER TABLE in the documentation and "How do you change a
column's data type?" in the FAQ:

http://www.postgresql.org/docs/8.0/static/sql-altertable.html
http://www.postgresql.org/docs/faqs.FAQ.html#4.3

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

In response to

pgsql-admin by date

Next:From: Chuming ChenDate: 2005-06-28 14:39:59
Subject: Re: change existing table definition
Previous:From: Johannes LochmannDate: 2005-06-28 14:26:19
Subject: Re: change existing table definition

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