pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Tommy Pavlicek <tommypav122@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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 15:51:16 +0200
Message-ID: <ZTfL1G1fBPQHVPWV@msg.df7cb.de> (raw)
In-Reply-To: <CAEhP-W_1bMTLan2LtzS+xr=b-Wep56gw+OoirABQ8b2aOw+5yg@mail.gmail.com>
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>

Re: Tommy Pavlicek
> I've added another patch (0002-require_unused_neg_com-v1.patch) that
> prevents using a commutator or negator that's already part of a pair.

Hmm. I agree with the general idea of adding sanity checks, but this
might be overzealous:

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).

https://github.com/postgrespro/pgsphere/blob/master/pgs_moc_compat.sql.in

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?

Christoph





view thread (25+ messages)  latest in thread

Message-ID: <ZTfL1G1fBPQHVPWV@msg.df7cb.de>
Permalink:  ../ZTfL1G1fBPQHVPWV@msg.df7cb.de/
Also on:    postgresql.org/message-id/ZTfL1G1fBPQHVPWV@msg.df7cb.de

 · 

reply

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: myon@debian.org, tommypav122@gmail.com, tgl@sss.pgh.pa.us, 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: <ZTfL1G1fBPQHVPWV@msg.df7cb.de>

* 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