From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christoph Berg <myon@debian.org>
Cc: Tommy Pavlicek <tommypav122@gmail.com>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: pgsql-hackers@lists.postgresql.org, Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: jian.universality@gmail.com
Subject: Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges
Date: Tue, 24 Oct 2023 11:16:54 -0400
Message-ID: <560086.1698160614@sss.pgh.pa.us> (raw)
In-Reply-To: <ZTfL1G1fBPQHVPWV@msg.df7cb.de>
References: <4077062.1687452468@sss.pgh.pa.us>
<87r0q3qvxd.fsf@wibble.ilmari.org>
<4082750.1687455374@sss.pgh.pa.us>
<CAEhP-W_xGQVmiEJE_x0x5bbDSwsmaN1TQEawNadiMvQj2XK2Sg@mail.gmail.com>
<15382.1687519306@sss.pgh.pa.us>
<CAEhP-W-bY5CTXgrsH_J=NyKJpqMOgUPqMQ9-oTtx2N+zND1ZuA@mail.gmail.com>
<1092363.1695932314@sss.pgh.pa.us>
<CAEhP-W8MjoA0yDCipp=FgZvoQA-OVjQws3-XO6bpCWXunO8t8A@mail.gmail.com>
<447166.1696969927@sss.pgh.pa.us>
<CAEhP-W_1bMTLan2LtzS+xr=b-Wep56gw+OoirABQ8b2aOw+5yg@mail.gmail.com>
<ZTfL1G1fBPQHVPWV@msg.df7cb.de>
Christoph Berg <myon@debian.org> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, myon@debian.org, tommypav122@gmail.com, ilmari@ilmari.org, tomas.vondra@enterprisedb.com, jian.universality@gmail.com
Subject: Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges
In-Reply-To: <560086.1698160614@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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