From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Cannot drop column |
Date: | 2024-12-18 21:34:07 |
Message-ID: | 5060eb8f-2618-4cfb-8714-11907b440193@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 12/18/24 11:04 AM, Rich Shepard wrote:
> On Wed, 18 Dec 2024, Viral Shah wrote:
>
>> 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";
>
> Viral,
>
> Huh! I've not before encountered this in the 30+ years I've used postgres.
It has been that way for a long time:
https://www.postgresql.org/docs/7.0/syntax525.htm
Your issue though is as Ron pointed out:
alter table statustypes drop column Suspect
That is trying to drop a column named "Suspect" when in fact the column
name is stat_name. 'Suspect' is a value in the column.
>
> Thanks for the lesson.
>
> Regards,
>
> Rich
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2024-12-18 23:11:36 | Re: Intermittent errors when fetching cursor rows on PostgreSQL 16 |
Previous Message | Tom Lane | 2024-12-18 20:22:09 | Re: Using Expanded Objects other than Arrays from plpgsql |