Re: delete columns from table!

From: Fariba Noorbakhsh <fNoorbakhsh(at)tecways(dot)com>
To: Tim Barnard <tbarnard(at)povn(dot)com>, prlw1(at)newn(dot)cam(dot)ac(dot)uk
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: delete columns from table!
Date: 2001-08-14 07:49:51
Message-ID: 3B78D81F.117583E2@ccs-munich.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks, it helps!

Tim Barnard wrote:

> Another way SELECT INTO a new table, omitting the column you want to delete.
>
> Tim
>
> ----- Original Message -----
> From: "Patrick Welche" <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
> To: "Fariba Noorbakhsh" <fNoorbakhsh(at)tecways(dot)com>
> Cc: <pgsql-general(at)postgresql(dot)org>
> Sent: Monday, August 13, 2001 7:36 AM
> Subject: Re: [GENERAL] delete columns from table!
>
> > On Mon, Aug 06, 2001 at 05:42:09PM +0200, Fariba Noorbakhsh wrote:
> > > Hi Patrick,
> > >
> > > Do you know how I can drop(delete) a column from a table?! Just a
> column. I don't
> > > think you can do it with Alter table
> > >
> > > Thanks in advance,
> > > Fariba
> >
> > According to the TODO list:
> >
> > COMMANDS
> > ...
> > * ALTER
> > ...
> > o Add ALTER TABLE DROP COLUMN feature [drop]
> >
> >
> > so the way forward may be to
> > pg_dump -t your_table -D your_database > table.txt
> > and have fun editing out all reference to said column from table.txt. Then
> > drop the table and reload from table.txt. YMMV..
> >
> > Cheers,
> >
> > Patrick
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Loginov 2001-08-14 08:06:40 Perfomance decreasing
Previous Message Jeff Davis 2001-08-14 07:23:30 PostgreSQL library functions