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 1u7dGu-002qxO-7T for pgsql-general@arkaria.postgresql.org; Wed, 23 Apr 2025 16:48:28 +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 1u7dGr-0085gx-2h for pgsql-general@arkaria.postgresql.org; Wed, 23 Apr 2025 16:48:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u7dGq-0085g0-NN for pgsql-general@lists.postgresql.org; Wed, 23 Apr 2025 16:48:25 +0000 Received: from smtp107.iad3a.emailsrvr.com ([173.203.187.107]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7dGp-001Z6L-0v for pgsql-general@postgresql.org; Wed, 23 Apr 2025 16:48:24 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp38.relay.iad3a.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id CEAA25A82; Wed, 23 Apr 2025 12:48:21 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.1\)) Subject: Re: Feature Proposal: Column-Level DELETE Operation in SQL From: Christophe Pettus In-Reply-To: Date: Wed, 23 Apr 2025 09:47:50 -0700 Cc: pgsql-general@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Abhishek Hatgine X-Mailer: Apple Mail (2.3776.700.51.11.1) X-Classification-ID: 07b865fb-5a03-4ae7-8e8b-cf4cee37e14b-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Apr 21, 2025, at 09:53, Abhishek Hatgine = wrote: > However, there=E2=80=99s no specific, expressive way to delete the = value of a column directly. The typical workaround is to use: > UPDATE Customers SET Address =3D NULL WHERE CustomerID =3D 103; I'm not sure I agree that's unexpressive. When you consider the = relational model, it's not clear to me what "deleting the value of a = column" means. It could be: 1. Removing the current value, which begs the question of "replacing it = with what?" 2. Dropping the column, for which we already have ALTER TABLE ... DROP = COLUMN. Can you give a bit more detail about what the state of the table is when = you have "deleted the value of a column directly"?=