Re: minor error message inconsistency in make_pathkey_from_sortinfo

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: minor error message inconsistency in make_pathkey_from_sortinfo
Date: 2024-04-24 09:47:36
Message-ID: 20240424184736.d16803a87d6c8a22088e0a2b@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 24 Apr 2024 15:05:00 +0800
jian he <jian(dot)universality(at)gmail(dot)com> wrote:

> hi.
>
> in make_pathkey_from_sortinfo
>
> equality_op = get_opfamily_member(opfamily,
> opcintype,
> opcintype,
> BTEqualStrategyNumber);
> if (!OidIsValid(equality_op)) /* shouldn't happen */
> elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
> BTEqualStrategyNumber, opcintype, opcintype, opfamily);
>
> the error message seems not right?

This message was introduced by 278cb434110 which was aiming to
standardize the wording for similar errors. We can find the pattern

"missing {support function | operator} %d(%u,%u) in opfamily %u"

in several places.

Regards,
Yugo Nagata

>
> maybe
> if (!OidIsValid(equality_op)) /* shouldn't happen */
> elog(ERROR, "missing operator =(%u,%u) in opfamily %u",opcintype,
> opcintype, opfamily);
>
> or
>
> if (!OidIsValid(equality_op)) /* shouldn't happen */
> elog(ERROR, "missing equality operator for type %u in opfamily
> %u",opcintype, opcintype, opfamily);
>
>

--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2024-04-24 09:50:54 Re: Cleanup: remove unused fields from nodes
Previous Message Peter Eisentraut 2024-04-24 09:46:40 Re: Q: Escapes in jsonpath Idents