On Tue, Jul 11, 2023 at 12:30 PM Hayato Kuroda (Fujitsu)
<kuroda.hay...@fujitsu.com> wrote:
>
> Dear Amit,
>
> > Isn't the same true for the hash operator class family as well?
>
> True. I didn't write it on purpose because I didn't know the operator which is
> operator class for BTree but not for Hash. But I agreed to clarify it.
>
> > Can we
> > slightly change the line as: "... the table includes an attribute
> > whose datatype doesn't have an equality operator defined for it..".
>
> Hmm, this suggestion is dubious for me. Regarding the point datatype, it has 
> the
> "same as" operator [1]. E.g., following SQL returns true.
>
> ```
> postgres=# select point '(1, 1)' ~= point '(1, 1)';
>  ?column?
> ----------
>  t
> (1 row)
> ```
>
> The reason why they cannot be supported by tuples_equal() is that 
> lookup_type_cache()
> only checks the operator classes for Btree and Hash. ~= does not defined as 
> the class.
>

Fair enough, but the part of the line:"..  whose datatype is not an
operator class of Btree or Hash." doesn't appear very clear to me.
Because it sounds like we are checking whether datatype has any
operator class for btree or hash access methods but we are actually
checking if there is an equality operator (function) defined in the
default op class for those access methods. Am, I missing something?

-- 
With Regards,
Amit Kapila.


Reply via email to