Re: [GENERAL] delete columm help

From: Tom Ivar Helbekkmo <tih+mail(at)Hamartun(dot)Priv(dot)NO>
To: Joao Paulo Felix <felix(at)cyclades(dot)com>
Cc: "pgsql-general(at)postgreSQL(dot)org" <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] delete columm help
Date: 1998-05-28 05:32:08
Message-ID: 86k9772c6f.fsf@barsoom.Hamartun.Priv.NO
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Joao Paulo Felix <felix(at)cyclades(dot)com> writes:

> 1) Good books/reference on PostgreSQL for a novice?

I've no particular SQL book to recommend, although I hear much good
about Joe Celco's "SQL for Smarties". For a very good online
tutorial, check out <http://w3.one.net/~jhoffman/sqltut.htm>.

> 2) How do I delete a columm from a table, I have tried to use the
> following:
>
> DELETE FROM table_name columm_name

That should be

alter table table_name drop column column_name;

However, it's not yet implemented. You might rename the table, create
a new one lacking the offending column, and copy the data over. On
the other hand, you might just not worry about it. That's one of the
great things about SQL: if you can take the space consumption hit, an
extraneous column doesn't matter. Just don't "select *", which you
normally shouldn't do anyway.

-tih
--
Popularity is the hallmark of mediocrity. --Niles Crane, "Frasier"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter T Mount 1998-05-28 05:32:45 Re: [HACKERS] Off-topic: Communication. (was: Connect string again)
Previous Message Oliver Elphick 1998-05-28 04:42:15 Re: [GENERAL] delete columm help

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter T Mount 1998-05-28 05:32:45 Re: [HACKERS] Off-topic: Communication. (was: Connect string again)
Previous Message Bruce Momjian 1998-05-28 04:27:16 Re: [HACKERS] removal of exec()