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 1tNz9J-003Lbk-SA for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2024 18:51:58 +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 1tNz9J-000mfO-9B for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2024 18:51:57 +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 1tNz9I-000mfE-Ua for pgsql-general@lists.postgresql.org; Wed, 18 Dec 2024 18:51:56 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tNz9G-000S5S-2r for pgsql-general@postgresql.org; Wed, 18 Dec 2024 18:51:56 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3eba0f09c3aso2005882b6e.1 for ; Wed, 18 Dec 2024 10:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734547913; x=1735152713; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4l8Mnbe+sm8mWneAFmMTX1ic5653N1ruBlm0MrQvBSc=; b=HtixxaDGS7jdwF2i9wb4uAx2AQIpNadQYSl0BmUcghGB6EigLrZhs1AhbpONWXTNSu CTQFL9h7iWGivKxarRWmJk9zBLQf8IZkEkUnWQZndw6sUpz7CcscwWNdcKCKUR7YpkUX 6HTUVFGG9s7TxUpseNJxs6Xl+2llTfioqP3UtcM91QEFrVMpy52+sJPG8GGa1UaHaB10 Re3WkPYN3I3+R8aPeAeHDv8/6Gtvvwc3x0JYcS3nGrNVlP+Xc8OG0T45nXlOvu6nYgnz GQ7d17TwrM0FSaBiJ7XaFs1Odvip/zSoYptvnL66+KJWlSwe26PMYFYVgyqvKKL8uEsL xpyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734547913; x=1735152713; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4l8Mnbe+sm8mWneAFmMTX1ic5653N1ruBlm0MrQvBSc=; b=ZCqiyKiUdog4BXc9mt05CRN0h1uaM+Dr2gVjINYlOFEvUPLKxlJJk81pdscsoAzYmc dUcwGj5uvF+9ixcZ5ek/n6c8HEO1NlacO7FjWSEjnWtL/SDyRJbYaZ/tQwZb0+QiU/Iz 1ZidcIqWk6uCzs2e6FhP5Ra0hNWqh+ZrMOagd00nxvZ8Y0K3APTbvuowSKLlbjpJlaOT OjAh3ddZbtFI6NxxS4JwV3pUTfxsUhksUc578rbURMxqkbLlz5CknGMq+xXQRAWYb4at Qd6Lwj8XrHWSi+a3VN7V8A2tVGaw5dWFVtt+6dTOO4X4hKtTqU5nt3Q6dQS4FEnbpkF3 rw1Q== X-Gm-Message-State: AOJu0Yzxfbcl67TpjhnR5dQdfFe5y1P8YJSw9U5k3DqEbOYcp4EcYQWO FrhUnAECUircGtyxhezoyqmtGBJ9pTVJmZYoGeCFlfsNhDZHYfPe1SfvmgRoAq2yxtXN+IpulQ7 85AXNxP3LsUeTEiHMmBEt7EETVC+Tc+60 X-Gm-Gg: ASbGncs+T71u0QlXym8ShNCOFOYm3aplOo2WAdBXQrfKOgMWNbVsrHRbUMfqxm+OkJc IiOwdhHvuI1DusvhmCMwZyT9GCENf7ouv64YS X-Google-Smtp-Source: AGHT+IEki7uxfBH4D/FcFtNWddKvcd03xiP5GfIbMvbymBvKnCKwHNI3D4xBPBclyeVHpldMjHsg9B1USNdhU5VOhw8= X-Received: by 2002:a05:6808:15a8:b0:3ea:6586:961f with SMTP id 5614622812f47-3ecdcb99c44mr469582b6e.5.1734547912651; Wed, 18 Dec 2024 10:51:52 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Viral Shah Date: Wed, 18 Dec 2024 13:51:41 -0500 Message-ID: Subject: Re: Cannot drop column To: Rich Shepard Cc: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="0000000000002df9c506298fe878" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002df9c506298fe878 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFPM Rich Shepard wrote: > I'm not seeing why postgres won't drop a table's column: > > bustrac=3D# select * from statustypes order by stat_name; > stat_name > -------------------- > Client > Lead > No further contact > Opportunity > Proposal submitted > Prospect > Qualified > Referral > Suspect > (9 rows) > > bustrac=3D# alter table statustypes drop column Suspect; > ERROR: column "suspect" of relation "statustypes" does not exist > bustrac=3D# > > What have I done incorrectly? > > TIA, > > Rich > > > --0000000000002df9c506298fe878 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Since your column name has an Upper case character, y= ou will have to use double quotes to drop it. Try alter table statustypes d= rop column "Suspect";

Thanks,
= Viral
<= div dir=3D"ltr">



On Wed, Dec 18, 2024 at 1:47= =E2=80=AFPM Rich Shepard <rs= hepard@appl-ecosys.com> wrote:
I'm not seeing why postgres won't drop a tabl= e's column:

bustrac=3D# select * from statustypes order by stat_name;
=C2=A0 =C2=A0 =C2=A0 stat_name
--------------------
=C2=A0 Client
=C2=A0 Lead
=C2=A0 No further contact
=C2=A0 Opportunity
=C2=A0 Proposal submitted
=C2=A0 Prospect
=C2=A0 Qualified
=C2=A0 Referral
=C2=A0 Suspect
(9 rows)

bustrac=3D# alter table statustypes drop column Suspect;
ERROR:=C2=A0 column "suspect" of relation "statustypes"= does not exist
bustrac=3D#

What have I done incorrectly?

TIA,

Rich


--0000000000002df9c506298fe878--