Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tO1gR-003bdO-Qn for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2024 21:34:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tO1gR-002TCs-5t for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2024 21:34:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tO1gP-002TCk-Rb for pgsql-general@lists.postgresql.org; Wed, 18 Dec 2024 21:34:18 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tO1gK-000TPQ-Oz for pgsql-general@postgresql.org; Wed, 18 Dec 2024 21:34:16 +0000 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id 58B791140169; Wed, 18 Dec 2024 16:34:10 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Wed, 18 Dec 2024 16:34:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1734557650; x=1734644050; bh=bTxeZf3TtzNF/tEsii2kdiPi7XzWcL1YVco4IuWBbVk=; b= DkRW3puYcprvgSqwp14ORvp1s+m9O84ET3SLmWwgxM7rpwmtuPvrqfUFjWg+9Phu uvfOLvTvMMvn0pbDioe5deiHlXqgZAfOJrD4fmzIx/h0vWr2+3eqFDdqpteyH1K/ wqWIWKorOAx5d8g3a3ycHa1ygHkJxHP+nZ5l4Ky90r3+s25gwq4tu6iN52nekTOw KQIPCub20jb1ZMbcy68ajOCM7Z8GyrIWvMWgPvL3NqHHrdobw+9FNWW+UIioLfNk v74DR+Dp7NvQx/9Q2dsXlXe7VGLH7fS68Ec/Iahlo/jMVFvlSH+eFaw9EOIGf1Hi +eDoOOSq4jVwxmkLd6P2fg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1734557650; x=1734644050; bh=b TxeZf3TtzNF/tEsii2kdiPi7XzWcL1YVco4IuWBbVk=; b=NJ9zBAkc7EUMnQEnU yBiPFxr0lQ2ZB9tir71fk0vekUzIVpOb7diIR6ofjCIsDU5W4Zhnfx+7uHriX+iT tiUFRLMcZi6/yG4h1JYJuW6vSLZdVCZnFVkAPfbxjOJABdPAbyBjhh74ZIFc0guv /KbIXG7dCTvNUrNoB/kyZFWjB5ytgKqCxX6MuEM5JD4Qg1oP8vaKNnb/eLF7DznI cKiOQqhCsPL3tAmWrXes4aUKLMOoIxRs/YVMz/iL3OLiSnGONAbUPMOC0KEUby4o CnA7KintZBipsgmvPV4xl6HrUKwKxhl/Dr7hnw1wcDZ7DXkmzyUGrl7sU5IZHgzC X1LrQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrleekgdduhedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeen ucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrse grkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeekfeehuddvjeeigfeifeej tdduudffledvfeelheeftdeiffeugfdvkeelgedtvdenucffohhmrghinhepphhoshhtgh hrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgspg hrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhshhgvphgr rhgusegrphhplhdqvggtohhshihsrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnh gvrhgrlhesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 Dec 2024 16:34:08 -0500 (EST) Message-ID: <5060eb8f-2618-4cfb-8714-11907b440193@aklaver.com> Date: Wed, 18 Dec 2024 13:34:07 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cannot drop column To: Rich Shepard , pgsql-general@postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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@aklaver.com