Re: Issue with custom operator in simple case

From: Maxim Orlov <orlovmg(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Issue with custom operator in simple case
Date: 2025-06-30 15:49:20
Message-ID: CACG=eza6c=NiKJNgjqAwq-dgGHkZO-xB9Cg0okJ=koL6pe28AA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

AFAICS, we have the following problem constructions:
================================
a IS DISTINCT FROM b
a IS NOT DISTINCT FROM b
a IN (...)
a NOT IN (...)
CASE a WHEN b THEN ... ELSE d END
NULLIF(a, b)
JOIN USING / NATURAL JOIN
================================

As a quick recap, the following options are available to us.
1) Add the "USING operator" clause.
Rejected due to:
* Non-standard syntax.
* ruleutils.c could not safely convert this back to the source text.
* In case "IS DISTINCT FROM" on composite types, using only the eq operator
is maybe not enough.

2) Using default btree opclass/opfamily operators.
Rejected due to:
* Adding yet another way of selecting an operator to the
existingfunc_select_candidate and opfamily
seems too complicated and not safe.
* May not work in some cases.

3) CVE-2018-1058 revert.
Rejected due to obvious reasons.

In my humble opinion, the best way to solve an issue is (1). Whether it's
even worth it. Although it
uses non-standard syntax, it does not break the existing one.

--
Best regards,
Maxim Orlov.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-06-30 15:56:36 Re: pg_get_multixact_members not documented
Previous Message DINESH NAIR 2025-06-30 15:23:13 Re: A concurrent VACUUM FULL?