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 1u7fPh-003ayE-Qn for pgsql-general@arkaria.postgresql.org; Wed, 23 Apr 2025 19:05:42 +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 1u7fPf-009CWh-F6 for pgsql-general@arkaria.postgresql.org; Wed, 23 Apr 2025 19:05:40 +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 1u7fPe-009CWY-Rw for pgsql-general@lists.postgresql.org; Wed, 23 Apr 2025 19:05:39 +0000 Received: from giant.ash.relay.mailchannels.net ([23.83.222.68]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7fPc-001aAP-2R for pgsql-general@postgresql.org; Wed, 23 Apr 2025 19:05:38 +0000 X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DDE16163691; Wed, 23 Apr 2025 19:05:34 +0000 (UTC) Received: from pdx1-sub0-mail-a316.dreamhost.com (100-110-58-101.trex-nlb.outbound.svc.cluster.local [100.110.58.101]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 730821610EB; Wed, 23 Apr 2025 19:05:34 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1745435134; a=rsa-sha256; cv=none; b=swyldTqDpYdSn/+8RQSedDVWzqjU7yf3+5GXakUNnNVWW0DkR0zM964djbbK2n9yBvtjdk rikw6QEZpiCRYcD2y4atQ6xD11H24pXFdc1lkCc3Q26FGtqJfMTOA/NY8/5+dmKtYhaz8F m9d8WuPOykDCSziU8fAkVGqYHT65cuJ1ORUSwWtfViC77U+3QzSZleGzTlyH+uMrD/qbxw i/bjM1Vqz6fUUTZ4DkzoDwRevsnfq2SDinttFKPWf/VKIcKS26RyI6bDP01RN4BEDd0CHf BVhUwDD110B96CBstaQy+UH4/Y5HQiHx/fedVlYdB+gC3cBDNujuAyRA2agkAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1745435134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wbb0dszqsEGHKTwo6dAvsTYIGeNa2QnydtR5U8b88qg=; b=ki3up11XEGitRWHowmK45u9HV3vvY+YUu54nAAtD6m4uJDqrW1ibLy51ifPAVkaKo4szOz ez3IHs67ywvEgztkNc1Tw6Gi7Rwz0ebQeeXyRZ+eqvjD4Uhw+RC/vAKDkWV6ddPyqrmK9A km/OEuqFLsk4tx4GYyZaMWXABABpD9aQxDCADGeWClHPuobMg7BS5d29H9scYypzfJhNpi ncLPj9+kDjE3cBBO7d5FR2Mr7yHo3iYakTVhv8ezsp6iAnLzcxmSR388Fj5KN4DifO4RaO TFAEI6c8LVaNhGBSvRwa5/76VSkYUrilJsXn1gUw9CmWckh/r2mmn3Nl0rQE7Q== ARC-Authentication-Results: i=1; rspamd-5cfcf5665-p9tgt; auth=pass smtp.auth=dreamhost smtp.mailfrom=nico@cryptonector.com X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com X-MailChannels-Auth-Id: dreamhost X-Lyrical-Unite: 777c201d09213636_1745435134684_2352836252 X-MC-Loop-Signature: 1745435134684:3986323477 X-MC-Ingress-Time: 1745435134684 Received: from pdx1-sub0-mail-a316.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.110.58.101 (trex/7.0.3); Wed, 23 Apr 2025 19:05:34 +0000 Received: from ubby (syn-075-081-095-064.res.spectrum.com [75.81.95.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a316.dreamhost.com (Postfix) with ESMTPSA id 4ZjT8F6nj2z7f; Wed, 23 Apr 2025 12:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cryptonector.com; s=dreamhost; t=1745435134; bh=wbb0dszqsEGHKTwo6dAvsTYIGeNa2QnydtR5U8b88qg=; h=Date:From:To:Cc:Subject:Content-Type; b=fPXalxjUzKCHQCJFArH7e+zB8AIeLLOs1/D3qE2q4Fai4ONcwTGyaLI6g9nd2F+eN cbSvsYuOuwysleAh99tcQpkmmMg8dHB5Uk4k5A/g0YpHbYyhHzwnocP08kDwB/FZ2R RNIMLh9K4WhTNqhTi9La0xYHAZ5TArjRHjflf62dxPpgTLTwdMC0zhgk2ouFuz9/I6 jD/0vVwL6Uxb2oCSKIH0gR9iDnQCmGPT84er/HQ45PhKExItbgr1D4eHZFxbw+/3lW PfDtnUr6uucBQzvHVIylCVpVEnwrznJ08D2sc/FJP7JaRAMDa5SMa+tu2FtcOc0ZfF pct5fXVY2D+XQ== Date: Wed, 23 Apr 2025 14:05:31 -0500 From: Nico Williams To: Abhishek Hatgine Cc: pgsql-general@postgresql.org Subject: Re: Feature Proposal: Column-Level DELETE Operation in SQL Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Apr 21, 2025 at 10:23:30PM +0530, Abhishek Hatgine wrote: > These would act as a shortcut or expressive alias for setting one or more > column values to NULL. NULL values are not quite no-values, and setting some column of some row to NULL is not quite the same as deleting the column from the row. Even if the database's row encoding is such that a "null value" is not written there will be bits that indicate that the column's value is null. Now in an entity-attribute-value (EAV) sort of schema setting a column to NULL could be made to be the same as deleting that one row. But PG does not currently map tables to EAV stores, though I suppose it could eventually have table types that do just that, but that doesn't mean PG would need a new statement type. Even an RDBMS that only used an EAV metaschema internally would not need a new statement type. Setting a column value to NULL is just not "deleting a colun value". Having two ways to do this doesn't seem necessary at all. Moreover, with UPDATE one can set some columns to NULL values and others to non-NULL values in the same statement, whereas one could not do that with the new statement type you propose. [At this point this is just piling on, for which my apologies, but I thought the EAV thing might be worth noting.] Nico --