Search Postgresql Archives

Re: Cannot drop column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux