Re: Cannot drop column

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cannot drop column
Date: 2024-12-18 18:50:58
Message-ID: CANzqJaCtmNYd3BE+2C38_igTUUonzUaVtwdg_Asb_+VqAK5m0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 18, 2024 at 1:47 PM Rich Shepard <rshepard(at)appl-ecosys(dot)com>
wrote:

> I'm not seeing why postgres won't drop a table's column:
>
> bustrac=# select * from statustypes order by stat_name;
> stat_name
> --------------------
> Client
> Lead
> No further contact
> Opportunity
> Proposal submitted
> Prospect
> Qualified
> Referral
> Suspect
> (9 rows)
>
> bustrac=# alter table statustypes drop column Suspect;
> ERROR: column "suspect" of relation "statustypes" does not exist
> bustrac=#
>
> What have I done incorrectly?
>

stat_name is the column. "Suspect" is a row value of column stat_name.

DELETE FROM statustypes WHERE stat_name = 'Suspect';

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Viral Shah 2024-12-18 18:51:41 Re: Cannot drop column
Previous Message David G. Johnston 2024-12-18 18:49:56 Re: Cannot drop column