public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Rich Shepard <[email protected]>
To: [email protected]
Subject: Re: Cannot drop column
Date: Wed, 18 Dec 2024 13:34:07 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<CAEVFvu10BvsLoE5JWQrOVU4zLuyTnU1dtfhO7fuon47wTScYxg@mail.gmail.com>
	<[email protected]>



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
[email protected]






view thread (5+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Cannot drop column
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox