Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA10408; Wed, 15 Apr 92 15:13:38 -0700
Message-Id: <9204152213.AA10408@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: delete attr
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: mer@postgres.berkeley.edu
In-Reply-To: Your message of "Sat, 11 Apr 92 12:34:48 PDT."
             <9204111934.AA26093@dpi.inpe.br> 
Date: Wed, 15 Apr 92 15:12:07 PDT

you write:
> How should I delete a column from a given table?

One way to do this is:

	retrieve into temp (oldreln.a, ..., oldreln.z)
	destroy oldreln
	rename temp oldreln

Where the target list for the retrieve into doesn't contain
the attribute you wish to delete.

The only problem is that you lose any indices you had on
oldreln.  I can't think of a better way offhand.

Jeff Meredith
mer@postgres.berkeley.edu
