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 1qvJ9e-004QVk-4o for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Oct 2023 15:17:14 +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 1qvJ9c-008qIi-2N for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Oct 2023 15:17:12 +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 1qvJ9b-008qIZ-PS for pgsql-hackers@lists.postgresql.org; Tue, 24 Oct 2023 15:17:12 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvJ9Z-0025Vm-V4 for pgsql-hackers@lists.postgresql.org; Tue, 24 Oct 2023 15:17:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 39OFGsJK560087; Tue, 24 Oct 2023 11:16:54 -0400 From: Tom Lane To: Christoph Berg cc: Tommy Pavlicek , Dagfinn Ilmari =?iso-8859-1?Q?Manns=E5ker?= , pgsql-hackers@lists.postgresql.org, Tomas Vondra , jian.universality@gmail.com Subject: Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges In-reply-to: References: <4077062.1687452468@sss.pgh.pa.us> <87r0q3qvxd.fsf@wibble.ilmari.org> <4082750.1687455374@sss.pgh.pa.us> <15382.1687519306@sss.pgh.pa.us> <1092363.1695932314@sss.pgh.pa.us> <447166.1696969927@sss.pgh.pa.us> Comments: In-reply-to Christoph Berg message dated "Tue, 24 Oct 2023 15:51:16 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <560085.1698160614.1@sss.pgh.pa.us> Date: Tue, 24 Oct 2023 11:16:54 -0400 Message-ID: <560086.1698160614@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Christoph Berg writes: > This change is breaking pgsphere which has <@ @> operator pairs, but > for historical reasons also includes alternative spellings of these > operators (both called @ with swapped operand types) which now > explodes because we can't add them with the "proper" commutator and > negators declared (which point to the canonical <@ @> !<@ !@> > operators). Should have guessed that somebody might be depending on the previous squishy behavior. Still, I can't see how the above situation is a good idea. Commutators/negators should come in pairs, not have completely random links. I think it's only accidental that this setup isn't triggering other strange behavior. > We might be able to simply delete the @ operators, but doesn't this > new check break the general possibility to have more than one spelling > for the same operator? You can have more than one operator atop the same function. But why didn't you make the @ operators commutators of each other, rather than this mess? regards, tom lane