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