From: Johannes Lochmann <j.lochmann@i-penta.at>
To: pgsql-admin@postgresql.org
Subject: Re: change existing table definition
Date: Tue, 28 Jun 2005 16:26:19 +0200
Message-ID: <200506281626.20138.j.lochmann@i-penta.at> (raw)
In-Reply-To: <42C15044.4030407@musc.edu>
References: <42C15044.4030407@musc.edu>
On Tuesday 28 June 2005 15:27, Chuming Chen wrote:
Hello,
> How can I change the column definition of an existing table, ie. from
> varchar(30) to varchar(50)?
You did not mention any version, so for 8.0.x:
alter table t alter col type varchar(50);
> Is there any way to add a new column to an
> existing table?
alter table t add colum foo varchar(127)
Link tip:
http://www.postgresql.org/docs/8.0/interactive/ddl-alter.html
HTH
Johannes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: j.lochmann@i-penta.at
Subject: Re: change existing table definition
In-Reply-To: <200506281626.20138.j.lochmann@i-penta.at>
References: <42C15044.4030407@musc.edu> <200506281626.20138.j.lochmann@i-penta.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox