Re: operator class "xxx" does not exist for access method "yyy" - Mailing list pgsql-bugs

From John Naylor
Subject Re: operator class "xxx" does not exist for access method "yyy"
Date
Msg-id CAFBsxsFAb5T=jbeAa+xyJU3Ge--xAvkPf1hwcHi94GLRrzeOdw@mail.gmail.com
Whole thread Raw
In response to operator class "xxx" does not exist for access method "yyy"  (Tianyi Gao <gtydoit@gmail.com>)
List pgsql-bugs


On Thu, Mar 23, 2023 at 11:38 AM Tianyi Gao <gtydoit@gmail.com> wrote:
>
> Thanks for your reply, I have added some SQL statements, such as the following example when I use the BIT or BIT VARYING type, similar problems will occur.
>
> postgres=# CREATE TABLE t(c BIT varying(10)) PARTITION BY HASH((t.c));
> ERROR:  data type bit varying has no default operator class for access method "hash"
>
> postgres=# CREATE TABLE t(c BIT) PARTITION BY HASH((t.c));
> ERROR:  data type bit has no default operator class for access method "hash"

According to the documentation:
"Range and list partitioning require a btree operator class, while hash partitioning requires a hash operator class. If no operator class is specified explicitly, the default operator class of the appropriate type will be used; if no default operator class exists, an error will be raised. When hash partitioning is used, the operator class used must implement support function 2 (see Section 38.16.3 for details)."


--
John Naylor
EDB: http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: Sandeep Thakkar
Date:
Subject: Re: BUG #17857: Uninstaller does not work
Next
From: "1024"
Date:
Subject: An update deadlock bug