pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ERROR: commutator operator - is already the commutator of operator +
2+ messages / 2 participants
[nested] [flat]

* ERROR: commutator operator - is already the commutator of operator +
@ 2024-11-17 11:49 shohorab hossain <shohorab23@gmail.com>
  2024-11-17 16:05 ` Re: ERROR: commutator operator - is already the commutator of operator + Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: shohorab hossain @ 2024-11-17 11:49 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

 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 +

Command was: CREATE OPERATOR adempiere.- (

FUNCTION = adempiere.subtractdays,

LEFTARG = interval,

RIGHTARG = numeric,

COMMUTATOR = OPERATOR(adempiere.-)

);



pg_restore: error: could not execute query: ERROR: operator does not exist:
interval adempiere.- numeric

Command was: ALTER OPERATOR adempiere.- (interval, numeric) OWNER TO
adempiere;


With Best Regards

Shohorab Hossain

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ERROR: commutator operator - is already the commutator of operator +
  2024-11-17 11:49 ERROR: commutator operator - is already the commutator of operator + shohorab hossain <shohorab23@gmail.com>
@ 2024-11-17 16:05 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2024-11-17 16:05 UTC (permalink / raw)
  To: shohorab hossain <shohorab23@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-11-17 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-17 11:49 ERROR: commutator operator - is already the commutator of operator + shohorab hossain <shohorab23@gmail.com>
2024-11-17 16:05 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox