Re: adding fields to a table

From: Ian Barwick <barwick(at)gmx(dot)net>
To: Benjamin Jury <benjamin(dot)jury(at)mpuk(dot)com>, "'MT'" <m_tessier(at)sympatico(dot)ca>, GENERAL <pgsql-general(at)postgresql(dot)org>
Subject: Re: adding fields to a table
Date: 2003-06-26 17:29:10
Message-ID: 200306261929.11092.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 26 June 2003 18:34, Benjamin Jury wrote:
(...)
>
> You can use ALTER TABLE.
>
> ALTER TABLE <table> ADD [column] column type
>
> Can also rename columns, add constraints, change to NOT NULL, etc.
>
> However you cannot currently remove a column...

Oh yes you can:

ALTER TABLE tbl DROP COLUMN whatever

http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=ddl-alter.html

IIRC it was introduced fairly recently (7.3?)

Ian Barwick
barwick(at)gmx(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Gould 2003-06-26 17:31:38 MS Access, pgsqlODBC and PostgreSQL in Linux via Crossover Office --> not reliable
Previous Message Michael Brusser 2003-06-26 17:23:31 Core dump on HP