Re: ERROR: commutator operator - is already the commutator of operator + - Mailing list pgsql-bugs

From Tom Lane
Subject Re: ERROR: commutator operator - is already the commutator of operator +
Date
Msg-id 3057808.1731859535@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: commutator operator - is already the commutator of operator +  (shohorab hossain <shohorab23@gmail.com>)
List pgsql-bugs
shohorab hossain <shohorab23@gmail.com> 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



pgsql-bugs by date:

Previous
From: shohorab hossain
Date:
Subject: ERROR: commutator operator - is already the commutator of operator +
Next
From: Noah Misch
Date:
Subject: Re: BUG #18708: regex problem: (?:[^\d\D]){0} asserts with "lp->nouts == 0 && rp->nins == 0"