Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAaWj-0007Yr-A0 for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Jun 2023 18:19:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qAaWg-0003dU-Vd for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Jun 2023 18:19:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAaWg-0003ZK-Ht for pgsql-hackers@lists.postgresql.org; Sat, 17 Jun 2023 18:19:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qAaWZ-002kJF-MI for pgsql-hackers@lists.postgresql.org; Sat, 17 Jun 2023 18:19:53 +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 35HIJgtZ2602029; Sat, 17 Jun 2023 14:19:42 -0400 From: Tom Lane To: Tomas Vondra cc: Tommy Pavlicek , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] ltree hash functions In-reply-to: References: Comments: In-reply-to Tomas Vondra message dated "Sat, 17 Jun 2023 19:40:30 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2602027.1687025982.1@sss.pgh.pa.us> Date: Sat, 17 Jun 2023 14:19:42 -0400 Message-ID: <2602028.1687025982@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tomas Vondra writes: > I guess the "correct" solution would be to extend ALTER OPERATOR. I > wonder why it's not supported - it's clearly an intentional decision > (per comment in AlterOperator). So what might break if this changes for > an existing operator? This code was added by commit 321eed5f0. The thread leading up to that commit is here: https://www.postgresql.org/message-id/flat/3348985.V7xMLFDaJO%40dinodell There are some nontrivial concerns in there about breaking the semantics of existing exclusion constraints, for instance. I think we mostly rejected the concern about invalidation of cached plans as already-covered, but that wasn't the only problem. However, I think we could largely ignore the issues if we restricted ALTER OPERATOR to only add commutator, negator, hashes, or merges properties to operators that lacked them before --- which'd be the primary if not only use-case anyway. That direction can't break anything. regards, tom lane