Re: Cannot drop column

From: Viral Shah <viralshah009(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot drop column
Date: 2024-12-18 18:51:41
Message-ID: CAEVFvu10BvsLoE5JWQrOVU4zLuyTnU1dtfhO7fuon47wTScYxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Since your column name has an Upper case character, you will have to use
double quotes to drop it. Try alter table statustypes drop column "Suspect";

Thanks,
Viral

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?
>
> TIA,
>
> Rich
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2024-12-18 19:04:26 Re: Cannot drop column
Previous Message Ron Johnson 2024-12-18 18:50:58 Re: Cannot drop column