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 1tChmS-00Avc7-Ao for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2024 16:05:43 +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 1tChmP-000Kji-41 for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2024 16:05:41 +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 1tChmO-000Kja-Ru for pgsql-bugs@lists.postgresql.org; Sun, 17 Nov 2024 16:05:41 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tChmL-002R0v-A1 for pgsql-bugs@lists.postgresql.org; Sun, 17 Nov 2024 16:05:40 +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 4AHG5ZNY3057809; Sun, 17 Nov 2024 11:05:35 -0500 From: Tom Lane To: shohorab hossain cc: pgsql-bugs@lists.postgresql.org Subject: Re: ERROR: commutator operator - is already the commutator of operator + In-reply-to: References: Comments: In-reply-to shohorab hossain message dated "Sun, 17 Nov 2024 17:49:28 +0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3057807.1731859535.1@sss.pgh.pa.us> Date: Sun, 17 Nov 2024 11:05:35 -0500 Message-ID: <3057808.1731859535@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk shohorab hossain writes: > Whenever I try to restore a dump database backup to PostgreSQL version > 17.1, I receive the following error log. The dump is from PostgreSQL > version 15.8. > What is this error and how can I fix it?. > pg_restore: error: could not execute query: ERROR: commutator operator - is > already the commutator of operator + v17 is complaining about a logically-inconsistent situation that earlier versions did not notice. You have interval - numeric claiming to be the commutator of numeric - interval, which seems fine --- but according to this error message, numeric - interval is claiming to be the commutator of interval + numeric. If these operators have anything like the semantics their names suggest, that commutator linkage is a bug in the operator's definition. You need to get rid of it, or better adjust it to point to the right operator, ie interval - numeric. We don't have any syntax for adjusting the commutator link once set, but maybe you could manually edit the dump file. regards, tom lane