diff --git a/doc/src/sgml/ref/create_opclass.sgml b/doc/src/sgml/ref/create_opclass.sgml
index dd5252f..8d0ddfc 100644
--- a/doc/src/sgml/ref/create_opclass.sgml
+++ b/doc/src/sgml/ref/create_opclass.sgml
@@ -21,7 +21,7 @@ PostgreSQL documentation
 
  <refsynopsisdiv>
 <synopsis>
-CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAULT ] FOR TYPE <replaceable class="parameter">data_type</replaceable>
+CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAULT | BITWISE ] FOR TYPE <replaceable class="parameter">data_type</replaceable>
   USING <replaceable class="parameter">index_method</replaceable> [ FAMILY <replaceable class="parameter">family_name</replaceable> ] AS
   {  OPERATOR <replaceable class="parameter">strategy_number</replaceable> <replaceable class="parameter">operator_name</replaceable> [ ( <replaceable class="parameter">op_type</replaceable>, <replaceable class="parameter">op_type</replaceable> ) ] [ FOR SEARCH | FOR ORDER BY <replaceable class="parameter">sort_family_name</replaceable> ]
    | FUNCTION <replaceable class="parameter">support_number</replaceable> [ ( <replaceable class="parameter">op_type</replaceable> [ , <replaceable class="parameter">op_type</replaceable> ] ) ] <replaceable class="parameter">function_name</replaceable> ( <replaceable class="parameter">argument_type</replaceable> [, ...] )
@@ -106,6 +106,20 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
     </listitem>
    </varlistentry>
 
+    <varlistentry>
+    <term><literal>BITWISE</literal></term>
+    <listitem>
+     <para>
+      If present, the operator class equality is the same as equivalence.
+      For example, two integers that compare equal are also binary equal,
+      while, numerics can compare equal but have different scales,
+      thus numeric opclass is not <literal>BITWISE</literal>. Even though,
+      most opclasses implement bitwise equal comparison, this behaviour
+      must be set explicitly.
+     </para>
+    </listitem>
+   </varlistentry>
+
    <varlistentry>
     <term><replaceable class="parameter">data_type</replaceable></term>
     <listitem>
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c
index 6a1ccde..4e7180a 100644
--- a/src/backend/commands/opclasscmds.c
+++ b/src/backend/commands/opclasscmds.c
@@ -654,6 +654,7 @@ DefineOpClass(CreateOpClassStmt *stmt)
 	values[Anum_pg_opclass_opcintype - 1] = ObjectIdGetDatum(typeoid);
 	values[Anum_pg_opclass_opcdefault - 1] = BoolGetDatum(stmt->isDefault);
 	values[Anum_pg_opclass_opckeytype - 1] = ObjectIdGetDatum(storageoid);
+	values[Anum_pg_opclass_opcisbitwise - 1] = BoolGetDatum(stmt->isBitwise);
 
 	tup = heap_form_tuple(rel->rd_att, values, nulls);
 
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index 3432bb9..7c5dd7c 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -3785,6 +3785,7 @@ _copyCreateOpClassStmt(const CreateOpClassStmt *from)
 	COPY_NODE_FIELD(datatype);
 	COPY_NODE_FIELD(items);
 	COPY_SCALAR_FIELD(isDefault);
+	COPY_SCALAR_FIELD(isBitwise);
 
 	return newnode;
 }
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c
index 18cb014..d149cfb 100644
--- a/src/backend/nodes/equalfuncs.c
+++ b/src/backend/nodes/equalfuncs.c
@@ -1607,6 +1607,7 @@ _equalCreateOpClassStmt(const CreateOpClassStmt *a, const CreateOpClassStmt *b)
 	COMPARE_NODE_FIELD(datatype);
 	COMPARE_NODE_FIELD(items);
 	COMPARE_SCALAR_FIELD(isDefault);
+	COMPARE_SCALAR_FIELD(isBitwise);
 
 	return true;
 }
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 3f67aaf..a2dee33 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -445,7 +445,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
 
 %type <boolean> opt_instead
 %type <boolean> opt_unique opt_concurrently opt_verbose opt_full
-%type <boolean> opt_freeze opt_analyze opt_default opt_recheck
+%type <boolean> opt_freeze opt_analyze opt_default opt_recheck opt_bitwise
 %type <defelt>	opt_binary copy_delimiter
 
 %type <boolean> copy_from opt_program
@@ -616,7 +616,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
 	AGGREGATE ALL ALSO ALTER ALWAYS ANALYSE ANALYZE AND ANY ARRAY AS ASC
 	ASSERTION ASSIGNMENT ASYMMETRIC AT ATTACH ATTRIBUTE AUTHORIZATION
 
-	BACKWARD BEFORE BEGIN_P BETWEEN BIGINT BINARY BIT
+	BACKWARD BEFORE BEGIN_P BETWEEN BIGINT BINARY BIT BITWISE
 	BOOLEAN_P BOTH BY
 
 	CACHE CALL CALLED CASCADE CASCADED CASE CAST CATALOG_P CHAIN CHAR_P
@@ -5951,16 +5951,17 @@ opt_if_not_exists: IF_P NOT EXISTS              { $$ = true; }
  *****************************************************************************/
 
 CreateOpClassStmt:
-			CREATE OPERATOR CLASS any_name opt_default FOR TYPE_P Typename
+			CREATE OPERATOR CLASS any_name opt_default opt_bitwise FOR TYPE_P Typename
 			USING access_method opt_opfamily AS opclass_item_list
 				{
 					CreateOpClassStmt *n = makeNode(CreateOpClassStmt);
 					n->opclassname = $4;
 					n->isDefault = $5;
-					n->datatype = $8;
-					n->amname = $10;
-					n->opfamilyname = $11;
-					n->items = $13;
+					n->isBitwise = $6;
+					n->datatype = $9;
+					n->amname = $11;
+					n->opfamilyname = $12;
+					n->items = $14;
 					$$ = (Node *) n;
 				}
 		;
@@ -6023,6 +6024,10 @@ opt_default:	DEFAULT						{ $$ = true; }
 			| /*EMPTY*/						{ $$ = false; }
 		;
 
+opt_bitwise:	BITWISE						{ $$ = true; }
+			| /*EMPTY*/						{ $$ = false; }
+		;
+
 opt_opfamily:	FAMILY any_name				{ $$ = $2; }
 			| /*EMPTY*/						{ $$ = NIL; }
 		;
@@ -15066,6 +15071,7 @@ unreserved_keyword:
 			| BACKWARD
 			| BEFORE
 			| BEGIN_P
+			| BITWISE
 			| BY
 			| CACHE
 			| CALL
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index bf69adc..6a13d19 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -12833,6 +12833,7 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo)
 	int			i_opcintype;
 	int			i_opckeytype;
 	int			i_opcdefault;
+	int			i_opcisbitwise;
 	int			i_opcfamily;
 	int			i_opcfamilyname;
 	int			i_opcfamilynsp;
@@ -12849,6 +12850,7 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo)
 	char	   *opcintype;
 	char	   *opckeytype;
 	char	   *opcdefault;
+	char	   *opcisbitwise;
 	char	   *opcfamily;
 	char	   *opcfamilyname;
 	char	   *opcfamilynsp;
@@ -12875,11 +12877,25 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo)
 	nameusing = createPQExpBuffer();
 
 	/* Get additional fields from the pg_opclass row */
-	if (fout->remoteVersion >= 80300)
+	if (fout->remoteVersion >= 13000)
+	{
+		appendPQExpBuffer(query, "SELECT opcintype::pg_catalog.regtype, "
+						  "opckeytype::pg_catalog.regtype, "
+						  "opcdefault, opcisbitwise, opcfamily, "
+						  "opfname AS opcfamilyname, "
+						  "nspname AS opcfamilynsp, "
+						  "(SELECT amname FROM pg_catalog.pg_am WHERE oid = opcmethod) AS amname "
+						  "FROM pg_catalog.pg_opclass c "
+						  "LEFT JOIN pg_catalog.pg_opfamily f ON f.oid = opcfamily "
+						  "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = opfnamespace "
+						  "WHERE c.oid = '%u'::pg_catalog.oid",
+						  opcinfo->dobj.catId.oid);
+	}
+	else if (fout->remoteVersion >= 80300)
 	{
 		appendPQExpBuffer(query, "SELECT opcintype::pg_catalog.regtype, "
 						  "opckeytype::pg_catalog.regtype, "
-						  "opcdefault, opcfamily, "
+						  "opcdefault, 'f' as opcisbitwise, opcfamily, "
 						  "opfname AS opcfamilyname, "
 						  "nspname AS opcfamilynsp, "
 						  "(SELECT amname FROM pg_catalog.pg_am WHERE oid = opcmethod) AS amname "
@@ -12893,7 +12909,7 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo)
 	{
 		appendPQExpBuffer(query, "SELECT opcintype::pg_catalog.regtype, "
 						  "opckeytype::pg_catalog.regtype, "
-						  "opcdefault, NULL AS opcfamily, "
+						  "opcdefault, 'f' as opcisbitwise, NULL AS opcfamily, "
 						  "NULL AS opcfamilyname, "
 						  "NULL AS opcfamilynsp, "
 						  "(SELECT amname FROM pg_catalog.pg_am WHERE oid = opcamid) AS amname "
@@ -12907,6 +12923,7 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo)
 	i_opcintype = PQfnumber(res, "opcintype");
 	i_opckeytype = PQfnumber(res, "opckeytype");
 	i_opcdefault = PQfnumber(res, "opcdefault");
+	i_opcisbitwise = PQfnumber(res, "opcisbitwise");
 	i_opcfamily = PQfnumber(res, "opcfamily");
 	i_opcfamilyname = PQfnumber(res, "opcfamilyname");
 	i_opcfamilynsp = PQfnumber(res, "opcfamilynsp");
@@ -12916,6 +12933,7 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo)
 	opcintype = pg_strdup(PQgetvalue(res, 0, i_opcintype));
 	opckeytype = PQgetvalue(res, 0, i_opckeytype);
 	opcdefault = PQgetvalue(res, 0, i_opcdefault);
+	opcisbitwise = PQgetvalue(res, 0, i_opcisbitwise);
 	/* opcfamily will still be needed after we PQclear res */
 	opcfamily = pg_strdup(PQgetvalue(res, 0, i_opcfamily));
 	opcfamilyname = PQgetvalue(res, 0, i_opcfamilyname);
@@ -12933,6 +12951,8 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo)
 					  fmtQualifiedDumpable(opcinfo));
 	if (strcmp(opcdefault, "t") == 0)
 		appendPQExpBufferStr(q, "DEFAULT ");
+	if (strcmp(opcisbitwise, "t") == 0)
+		appendPQExpBufferStr(q, "BITWISE ");
 	appendPQExpBuffer(q, "FOR TYPE %s USING %s",
 					  opcintype,
 					  fmtId(amname));
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 1f6de76..7bc8dbd 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -53,6 +53,6 @@
  */
 
 /*							yyyymmddN */
-#define CATALOG_VERSION_NO	201910251
+#define CATALOG_VERSION_NO	201910281
 
 #endif
diff --git a/src/include/catalog/pg_opclass.dat b/src/include/catalog/pg_opclass.dat
index 2d57510..045d9b6 100644
--- a/src/include/catalog/pg_opclass.dat
+++ b/src/include/catalog/pg_opclass.dat
@@ -17,76 +17,76 @@
 # assigned on-the-fly during initdb.
 
 { opcmethod => 'btree', opcname => 'array_ops', opcfamily => 'btree/array_ops',
-  opcintype => 'anyarray' },
+  opcintype => 'anyarray', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'array_ops', opcfamily => 'hash/array_ops',
-  opcintype => 'anyarray' },
+  opcintype => 'anyarray', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'bit_ops', opcfamily => 'btree/bit_ops',
-  opcintype => 'bit' },
+  opcintype => 'bit', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'bool_ops', opcfamily => 'btree/bool_ops',
-  opcintype => 'bool' },
+  opcintype => 'bool', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'bpchar_ops',
-  opcfamily => 'btree/bpchar_ops', opcintype => 'bpchar' },
+  opcfamily => 'btree/bpchar_ops', opcintype => 'bpchar', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'bpchar_ops', opcfamily => 'hash/bpchar_ops',
-  opcintype => 'bpchar' },
+  opcintype => 'bpchar', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'bytea_ops', opcfamily => 'btree/bytea_ops',
-  opcintype => 'bytea' },
+  opcintype => 'bytea', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'char_ops', opcfamily => 'btree/char_ops',
-  opcintype => 'char' },
+  opcintype => 'char', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'char_ops', opcfamily => 'hash/char_ops',
-  opcintype => 'char' },
+  opcintype => 'char', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'cidr_ops', opcfamily => 'btree/network_ops',
-  opcintype => 'inet', opcdefault => 'f' },
+  opcintype => 'inet', opcdefault => 'f', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'cidr_ops', opcfamily => 'hash/network_ops',
-  opcintype => 'inet', opcdefault => 'f' },
+  opcintype => 'inet', opcdefault => 'f', opcisbitwise => 't'},
 { oid => '3122', oid_symbol => 'DATE_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'date_ops',
-  opcfamily => 'btree/datetime_ops', opcintype => 'date' },
+  opcfamily => 'btree/datetime_ops', opcintype => 'date', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'date_ops', opcfamily => 'hash/date_ops',
-  opcintype => 'date' },
+  opcintype => 'date', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'float4_ops', opcfamily => 'btree/float_ops',
-  opcintype => 'float4' },
+  opcintype => 'float4', opcisbitwise => 'f'},
 { opcmethod => 'hash', opcname => 'float4_ops', opcfamily => 'hash/float_ops',
-  opcintype => 'float4' },
+  opcintype => 'float4', opcisbitwise => 'f'},
 { oid => '3123', oid_symbol => 'FLOAT8_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'float8_ops', opcfamily => 'btree/float_ops',
-  opcintype => 'float8' },
+  opcintype => 'float8', opcisbitwise => 'f'},
 { opcmethod => 'hash', opcname => 'float8_ops', opcfamily => 'hash/float_ops',
-  opcintype => 'float8' },
+  opcintype => 'float8', opcisbitwise => 'f'},
 { opcmethod => 'btree', opcname => 'inet_ops', opcfamily => 'btree/network_ops',
-  opcintype => 'inet' },
+  opcintype => 'inet', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'inet_ops', opcfamily => 'hash/network_ops',
-  opcintype => 'inet' },
+  opcintype => 'inet', opcisbitwise => 't'},
 { opcmethod => 'gist', opcname => 'inet_ops', opcfamily => 'gist/network_ops',
-  opcintype => 'inet', opcdefault => 'f' },
+  opcintype => 'inet', opcdefault => 'f', opcisbitwise => 't'},
 { opcmethod => 'spgist', opcname => 'inet_ops',
-  opcfamily => 'spgist/network_ops', opcintype => 'inet' },
+  opcfamily => 'spgist/network_ops', opcintype => 'inet', opcisbitwise => 't'},
 { oid => '1979', oid_symbol => 'INT2_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'int2_ops', opcfamily => 'btree/integer_ops',
-  opcintype => 'int2' },
+  opcintype => 'int2', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'int2_ops', opcfamily => 'hash/integer_ops',
-  opcintype => 'int2' },
+  opcintype => 'int2', opcisbitwise => 't'},
 { oid => '1978', oid_symbol => 'INT4_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'int4_ops', opcfamily => 'btree/integer_ops',
-  opcintype => 'int4' },
+  opcintype => 'int4', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'int4_ops', opcfamily => 'hash/integer_ops',
-  opcintype => 'int4' },
+  opcintype => 'int4', opcisbitwise => 't'},
 { oid => '3124', oid_symbol => 'INT8_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'int8_ops', opcfamily => 'btree/integer_ops',
-  opcintype => 'int8' },
+  opcintype => 'int8', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'int8_ops', opcfamily => 'hash/integer_ops',
-  opcintype => 'int8' },
+  opcintype => 'int8', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'interval_ops',
-  opcfamily => 'btree/interval_ops', opcintype => 'interval' },
+  opcfamily => 'btree/interval_ops', opcintype => 'interval', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'interval_ops',
-  opcfamily => 'hash/interval_ops', opcintype => 'interval' },
+  opcfamily => 'hash/interval_ops', opcintype => 'interval', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'macaddr_ops',
-  opcfamily => 'btree/macaddr_ops', opcintype => 'macaddr' },
+  opcfamily => 'btree/macaddr_ops', opcintype => 'macaddr', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'macaddr_ops',
-  opcfamily => 'hash/macaddr_ops', opcintype => 'macaddr' },
+  opcfamily => 'hash/macaddr_ops', opcintype => 'macaddr', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'macaddr8_ops',
-  opcfamily => 'btree/macaddr8_ops', opcintype => 'macaddr8' },
+  opcfamily => 'btree/macaddr8_ops', opcintype => 'macaddr8', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'macaddr8_ops',
-  opcfamily => 'hash/macaddr8_ops', opcintype => 'macaddr8' },
+  opcfamily => 'hash/macaddr8_ops', opcintype => 'macaddr8', opcisbitwise => 't'},
 
 # Here's an ugly little hack to save space in the system catalog indexes.
 # btree doesn't ordinarily allow a storage type different from input type;
@@ -94,157 +94,159 @@
 # and we can safely omit that within an index entry.  So we declare the
 # btree opclass for name as using cstring storage type.
 { opcmethod => 'btree', opcname => 'name_ops', opcfamily => 'btree/text_ops',
-  opcintype => 'name', opckeytype => 'cstring' },
+  opcintype => 'name', opckeytype => 'cstring', opcisbitwise => 't'},
 
 { opcmethod => 'hash', opcname => 'name_ops', opcfamily => 'hash/text_ops',
-  opcintype => 'name' },
+  opcintype => 'name', opcisbitwise => 't'},
 { oid => '3125', oid_symbol => 'NUMERIC_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'numeric_ops',
-  opcfamily => 'btree/numeric_ops', opcintype => 'numeric' },
+  opcfamily => 'btree/numeric_ops', opcintype => 'numeric',
+  opcisbitwise => 'f'},
 { opcmethod => 'hash', opcname => 'numeric_ops',
-  opcfamily => 'hash/numeric_ops', opcintype => 'numeric' },
+  opcfamily => 'hash/numeric_ops', opcintype => 'numeric',
+  opcisbitwise => 'f'},
 { oid => '1981', oid_symbol => 'OID_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'oid_ops', opcfamily => 'btree/oid_ops',
-  opcintype => 'oid' },
+  opcintype => 'oid', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'oid_ops', opcfamily => 'hash/oid_ops',
-  opcintype => 'oid' },
+  opcintype => 'oid', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'oidvector_ops',
-  opcfamily => 'btree/oidvector_ops', opcintype => 'oidvector' },
+  opcfamily => 'btree/oidvector_ops', opcintype => 'oidvector', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'oidvector_ops',
-  opcfamily => 'hash/oidvector_ops', opcintype => 'oidvector' },
+  opcfamily => 'hash/oidvector_ops', opcintype => 'oidvector', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'record_ops',
-  opcfamily => 'btree/record_ops', opcintype => 'record' },
+  opcfamily => 'btree/record_ops', opcintype => 'record', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'record_image_ops',
   opcfamily => 'btree/record_image_ops', opcintype => 'record',
-  opcdefault => 'f' },
+  opcdefault => 'f', opcisbitwise => 't'},
 { oid => '3126', oid_symbol => 'TEXT_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'text_ops', opcfamily => 'btree/text_ops',
-  opcintype => 'text' },
+  opcintype => 'text', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'text_ops', opcfamily => 'hash/text_ops',
-  opcintype => 'text' },
+  opcintype => 'text', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'time_ops', opcfamily => 'btree/time_ops',
-  opcintype => 'time' },
+  opcintype => 'time', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'time_ops', opcfamily => 'hash/time_ops',
-  opcintype => 'time' },
+  opcintype => 'time', opcisbitwise => 't'},
 { oid => '3127', oid_symbol => 'TIMESTAMPTZ_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'timestamptz_ops',
-  opcfamily => 'btree/datetime_ops', opcintype => 'timestamptz' },
+  opcfamily => 'btree/datetime_ops', opcintype => 'timestamptz', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'timestamptz_ops',
-  opcfamily => 'hash/timestamptz_ops', opcintype => 'timestamptz' },
+  opcfamily => 'hash/timestamptz_ops', opcintype => 'timestamptz', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'timetz_ops',
-  opcfamily => 'btree/timetz_ops', opcintype => 'timetz' },
+  opcfamily => 'btree/timetz_ops', opcintype => 'timetz', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'timetz_ops', opcfamily => 'hash/timetz_ops',
-  opcintype => 'timetz' },
+  opcintype => 'timetz', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'varbit_ops',
-  opcfamily => 'btree/varbit_ops', opcintype => 'varbit' },
+  opcfamily => 'btree/varbit_ops', opcintype => 'varbit', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'varchar_ops', opcfamily => 'btree/text_ops',
-  opcintype => 'text', opcdefault => 'f' },
+  opcintype => 'text', opcdefault => 'f', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'varchar_ops', opcfamily => 'hash/text_ops',
-  opcintype => 'text', opcdefault => 'f' },
+  opcintype => 'text', opcdefault => 'f', opcisbitwise => 't'},
 { oid => '3128', oid_symbol => 'TIMESTAMP_BTREE_OPS_OID',
   opcmethod => 'btree', opcname => 'timestamp_ops',
-  opcfamily => 'btree/datetime_ops', opcintype => 'timestamp' },
+  opcfamily => 'btree/datetime_ops', opcintype => 'timestamp', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'timestamp_ops',
-  opcfamily => 'hash/timestamp_ops', opcintype => 'timestamp' },
+  opcfamily => 'hash/timestamp_ops', opcintype => 'timestamp', opcisbitwise => 't'},
 { oid => '4217', oid_symbol => 'TEXT_BTREE_PATTERN_OPS_OID',
   opcmethod => 'btree', opcname => 'text_pattern_ops',
   opcfamily => 'btree/text_pattern_ops', opcintype => 'text',
-  opcdefault => 'f' },
+  opcdefault => 'f', opcisbitwise => 't'},
 { oid => '4218', oid_symbol => 'VARCHAR_BTREE_PATTERN_OPS_OID',
   opcmethod => 'btree', opcname => 'varchar_pattern_ops',
   opcfamily => 'btree/text_pattern_ops', opcintype => 'text',
-  opcdefault => 'f' },
+  opcdefault => 'f', opcisbitwise => 't'},
 { oid => '4219', oid_symbol => 'BPCHAR_BTREE_PATTERN_OPS_OID',
   opcmethod => 'btree', opcname => 'bpchar_pattern_ops',
   opcfamily => 'btree/bpchar_pattern_ops', opcintype => 'bpchar',
-  opcdefault => 'f' },
+  opcdefault => 'f', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'money_ops', opcfamily => 'btree/money_ops',
-  opcintype => 'money' },
+  opcintype => 'money', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'bool_ops', opcfamily => 'hash/bool_ops',
-  opcintype => 'bool' },
+  opcintype => 'bool', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'bytea_ops', opcfamily => 'hash/bytea_ops',
-  opcintype => 'bytea' },
+  opcintype => 'bytea', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'tid_ops', opcfamily => 'btree/tid_ops',
-  opcintype => 'tid' },
+  opcintype => 'tid', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'xid_ops', opcfamily => 'hash/xid_ops',
-  opcintype => 'xid' },
+  opcintype => 'xid', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'cid_ops', opcfamily => 'hash/cid_ops',
-  opcintype => 'cid' },
+  opcintype => 'cid', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'tid_ops', opcfamily => 'hash/tid_ops',
-  opcintype => 'tid' },
+  opcintype => 'tid', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'text_pattern_ops',
   opcfamily => 'hash/text_pattern_ops', opcintype => 'text',
-  opcdefault => 'f' },
+  opcdefault => 'f', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'varchar_pattern_ops',
   opcfamily => 'hash/text_pattern_ops', opcintype => 'text',
-  opcdefault => 'f' },
+  opcdefault => 'f', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'bpchar_pattern_ops',
   opcfamily => 'hash/bpchar_pattern_ops', opcintype => 'bpchar',
-  opcdefault => 'f' },
+  opcdefault => 'f', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'aclitem_ops',
-  opcfamily => 'hash/aclitem_ops', opcintype => 'aclitem' },
+  opcfamily => 'hash/aclitem_ops', opcintype => 'aclitem', opcisbitwise => 't'},
 { opcmethod => 'gist', opcname => 'box_ops', opcfamily => 'gist/box_ops',
-  opcintype => 'box' },
+  opcintype => 'box', opcisbitwise => 't'},
 { opcmethod => 'gist', opcname => 'point_ops', opcfamily => 'gist/point_ops',
-  opcintype => 'point', opckeytype => 'box' },
+  opcintype => 'point', opckeytype => 'box', opcisbitwise => 't'},
 { opcmethod => 'gist', opcname => 'poly_ops', opcfamily => 'gist/poly_ops',
-  opcintype => 'polygon', opckeytype => 'box' },
+  opcintype => 'polygon', opckeytype => 'box', opcisbitwise => 't'},
 { opcmethod => 'gist', opcname => 'circle_ops', opcfamily => 'gist/circle_ops',
-  opcintype => 'circle', opckeytype => 'box' },
+  opcintype => 'circle', opckeytype => 'box', opcisbitwise => 't'},
 { opcmethod => 'gin', opcname => 'array_ops', opcfamily => 'gin/array_ops',
-  opcintype => 'anyarray', opckeytype => 'anyelement' },
+  opcintype => 'anyarray', opckeytype => 'anyelement', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'uuid_ops', opcfamily => 'btree/uuid_ops',
-  opcintype => 'uuid' },
+  opcintype => 'uuid', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'uuid_ops', opcfamily => 'hash/uuid_ops',
-  opcintype => 'uuid' },
+  opcintype => 'uuid', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'pg_lsn_ops',
-  opcfamily => 'btree/pg_lsn_ops', opcintype => 'pg_lsn' },
+  opcfamily => 'btree/pg_lsn_ops', opcintype => 'pg_lsn', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'pg_lsn_ops', opcfamily => 'hash/pg_lsn_ops',
-  opcintype => 'pg_lsn' },
+  opcintype => 'pg_lsn', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'enum_ops', opcfamily => 'btree/enum_ops',
-  opcintype => 'anyenum' },
+  opcintype => 'anyenum', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'enum_ops', opcfamily => 'hash/enum_ops',
-  opcintype => 'anyenum' },
+  opcintype => 'anyenum', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'tsvector_ops',
-  opcfamily => 'btree/tsvector_ops', opcintype => 'tsvector' },
+  opcfamily => 'btree/tsvector_ops', opcintype => 'tsvector', opcisbitwise => 't'},
 { opcmethod => 'gist', opcname => 'tsvector_ops',
   opcfamily => 'gist/tsvector_ops', opcintype => 'tsvector',
-  opckeytype => 'gtsvector' },
+  opckeytype => 'gtsvector', opcisbitwise => 't'},
 { opcmethod => 'gin', opcname => 'tsvector_ops',
   opcfamily => 'gin/tsvector_ops', opcintype => 'tsvector',
-  opckeytype => 'text' },
+  opckeytype => 'text', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'tsquery_ops',
-  opcfamily => 'btree/tsquery_ops', opcintype => 'tsquery' },
+  opcfamily => 'btree/tsquery_ops', opcintype => 'tsquery', opcisbitwise => 't'},
 { opcmethod => 'gist', opcname => 'tsquery_ops',
   opcfamily => 'gist/tsquery_ops', opcintype => 'tsquery',
-  opckeytype => 'int8' },
+  opckeytype => 'int8', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'range_ops', opcfamily => 'btree/range_ops',
-  opcintype => 'anyrange' },
+  opcintype => 'anyrange', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'range_ops', opcfamily => 'hash/range_ops',
-  opcintype => 'anyrange' },
+  opcintype => 'anyrange', opcisbitwise => 't'},
 { opcmethod => 'gist', opcname => 'range_ops', opcfamily => 'gist/range_ops',
-  opcintype => 'anyrange' },
+  opcintype => 'anyrange', opcisbitwise => 't'},
 { opcmethod => 'spgist', opcname => 'range_ops',
-  opcfamily => 'spgist/range_ops', opcintype => 'anyrange' },
+  opcfamily => 'spgist/range_ops', opcintype => 'anyrange', opcisbitwise => 't'},
 { opcmethod => 'spgist', opcname => 'box_ops', opcfamily => 'spgist/box_ops',
-  opcintype => 'box' },
+  opcintype => 'box', opcisbitwise => 't'},
 { opcmethod => 'spgist', opcname => 'quad_point_ops',
-  opcfamily => 'spgist/quad_point_ops', opcintype => 'point' },
+  opcfamily => 'spgist/quad_point_ops', opcintype => 'point', opcisbitwise => 't'},
 { opcmethod => 'spgist', opcname => 'kd_point_ops',
-  opcfamily => 'spgist/kd_point_ops', opcintype => 'point', opcdefault => 'f' },
+  opcfamily => 'spgist/kd_point_ops', opcintype => 'point', opcdefault => 'f', opcisbitwise => 't'},
 { opcmethod => 'spgist', opcname => 'text_ops', opcfamily => 'spgist/text_ops',
-  opcintype => 'text' },
+  opcintype => 'text', opcisbitwise => 't'},
 { opcmethod => 'spgist', opcname => 'poly_ops', opcfamily => 'spgist/poly_ops',
-  opcintype => 'polygon', opckeytype => 'box' },
+  opcintype => 'polygon', opckeytype => 'box', opcisbitwise => 't'},
 { opcmethod => 'btree', opcname => 'jsonb_ops', opcfamily => 'btree/jsonb_ops',
-  opcintype => 'jsonb' },
+  opcintype => 'jsonb', opcisbitwise => 't'},
 { opcmethod => 'hash', opcname => 'jsonb_ops', opcfamily => 'hash/jsonb_ops',
-  opcintype => 'jsonb' },
+  opcintype => 'jsonb', opcisbitwise => 't'},
 { opcmethod => 'gin', opcname => 'jsonb_ops', opcfamily => 'gin/jsonb_ops',
-  opcintype => 'jsonb', opckeytype => 'text' },
+  opcintype => 'jsonb', opckeytype => 'text', opcisbitwise => 't'},
 { opcmethod => 'gin', opcname => 'jsonb_path_ops',
   opcfamily => 'gin/jsonb_path_ops', opcintype => 'jsonb', opcdefault => 'f',
-  opckeytype => 'int4' },
+  opckeytype => 'int4', opcisbitwise => 't'},
 
 # BRIN operator classes
 
@@ -252,94 +254,94 @@
 
 { opcmethod => 'brin', opcname => 'bytea_minmax_ops',
   opcfamily => 'brin/bytea_minmax_ops', opcintype => 'bytea',
-  opckeytype => 'bytea' },
+  opckeytype => 'bytea', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'char_minmax_ops',
   opcfamily => 'brin/char_minmax_ops', opcintype => 'char',
-  opckeytype => 'char' },
+  opckeytype => 'char', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'name_minmax_ops',
   opcfamily => 'brin/name_minmax_ops', opcintype => 'name',
-  opckeytype => 'name' },
+  opckeytype => 'name', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'int8_minmax_ops',
   opcfamily => 'brin/integer_minmax_ops', opcintype => 'int8',
-  opckeytype => 'int8' },
+  opckeytype => 'int8', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'int2_minmax_ops',
   opcfamily => 'brin/integer_minmax_ops', opcintype => 'int2',
-  opckeytype => 'int2' },
+  opckeytype => 'int2', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'int4_minmax_ops',
   opcfamily => 'brin/integer_minmax_ops', opcintype => 'int4',
-  opckeytype => 'int4' },
+  opckeytype => 'int4', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'text_minmax_ops',
   opcfamily => 'brin/text_minmax_ops', opcintype => 'text',
-  opckeytype => 'text' },
+  opckeytype => 'text', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'oid_minmax_ops',
-  opcfamily => 'brin/oid_minmax_ops', opcintype => 'oid', opckeytype => 'oid' },
+  opcfamily => 'brin/oid_minmax_ops', opcintype => 'oid', opckeytype => 'oid', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'tid_minmax_ops',
-  opcfamily => 'brin/tid_minmax_ops', opcintype => 'tid', opckeytype => 'tid' },
+  opcfamily => 'brin/tid_minmax_ops', opcintype => 'tid', opckeytype => 'tid', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'float4_minmax_ops',
   opcfamily => 'brin/float_minmax_ops', opcintype => 'float4',
-  opckeytype => 'float4' },
+  opckeytype => 'float4', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'float8_minmax_ops',
   opcfamily => 'brin/float_minmax_ops', opcintype => 'float8',
-  opckeytype => 'float8' },
+  opckeytype => 'float8', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'macaddr_minmax_ops',
   opcfamily => 'brin/macaddr_minmax_ops', opcintype => 'macaddr',
-  opckeytype => 'macaddr' },
+  opckeytype => 'macaddr', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'macaddr8_minmax_ops',
   opcfamily => 'brin/macaddr8_minmax_ops', opcintype => 'macaddr8',
-  opckeytype => 'macaddr8' },
+  opckeytype => 'macaddr8', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'inet_minmax_ops',
   opcfamily => 'brin/network_minmax_ops', opcintype => 'inet',
-  opcdefault => 'f', opckeytype => 'inet' },
+  opcdefault => 'f', opckeytype => 'inet', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'inet_inclusion_ops',
   opcfamily => 'brin/network_inclusion_ops', opcintype => 'inet',
-  opckeytype => 'inet' },
+  opckeytype => 'inet', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'bpchar_minmax_ops',
   opcfamily => 'brin/bpchar_minmax_ops', opcintype => 'bpchar',
-  opckeytype => 'bpchar' },
+  opckeytype => 'bpchar', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'time_minmax_ops',
   opcfamily => 'brin/time_minmax_ops', opcintype => 'time',
-  opckeytype => 'time' },
+  opckeytype => 'time', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'date_minmax_ops',
   opcfamily => 'brin/datetime_minmax_ops', opcintype => 'date',
-  opckeytype => 'date' },
+  opckeytype => 'date', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'timestamp_minmax_ops',
   opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamp',
-  opckeytype => 'timestamp' },
+  opckeytype => 'timestamp', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'timestamptz_minmax_ops',
   opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamptz',
-  opckeytype => 'timestamptz' },
+  opckeytype => 'timestamptz', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'interval_minmax_ops',
   opcfamily => 'brin/interval_minmax_ops', opcintype => 'interval',
-  opckeytype => 'interval' },
+  opckeytype => 'interval', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'timetz_minmax_ops',
   opcfamily => 'brin/timetz_minmax_ops', opcintype => 'timetz',
-  opckeytype => 'timetz' },
+  opckeytype => 'timetz', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'bit_minmax_ops',
-  opcfamily => 'brin/bit_minmax_ops', opcintype => 'bit', opckeytype => 'bit' },
+  opcfamily => 'brin/bit_minmax_ops', opcintype => 'bit', opckeytype => 'bit', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'varbit_minmax_ops',
   opcfamily => 'brin/varbit_minmax_ops', opcintype => 'varbit',
-  opckeytype => 'varbit' },
+  opckeytype => 'varbit', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'numeric_minmax_ops',
   opcfamily => 'brin/numeric_minmax_ops', opcintype => 'numeric',
-  opckeytype => 'numeric' },
+  opckeytype => 'numeric', opcisbitwise => 't'},
 
 # no brin opclass for record, anyarray
 
 { opcmethod => 'brin', opcname => 'uuid_minmax_ops',
   opcfamily => 'brin/uuid_minmax_ops', opcintype => 'uuid',
-  opckeytype => 'uuid' },
+  opckeytype => 'uuid', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'range_inclusion_ops',
   opcfamily => 'brin/range_inclusion_ops', opcintype => 'anyrange',
-  opckeytype => 'anyrange' },
+  opckeytype => 'anyrange', opcisbitwise => 't'},
 { opcmethod => 'brin', opcname => 'pg_lsn_minmax_ops',
   opcfamily => 'brin/pg_lsn_minmax_ops', opcintype => 'pg_lsn',
-  opckeytype => 'pg_lsn' },
+  opckeytype => 'pg_lsn', opcisbitwise => 't'},
 
 # no brin opclass for enum, tsvector, tsquery, jsonb
 
 { opcmethod => 'brin', opcname => 'box_inclusion_ops',
   opcfamily => 'brin/box_inclusion_ops', opcintype => 'box',
-  opckeytype => 'box' },
+  opckeytype => 'box', opcisbitwise => 't'},
 
 # no brin opclass for the geometric types except box
 
diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h
index 84853c1..9ab32b3 100644
--- a/src/include/catalog/pg_opclass.h
+++ b/src/include/catalog/pg_opclass.h
@@ -73,6 +73,9 @@ CATALOG(pg_opclass,2616,OperatorClassRelationId)
 
 	/* type of data in index, or InvalidOid */
 	Oid			opckeytype BKI_DEFAULT(0) BKI_LOOKUP(pg_type);
+
+	/* T if opclass equality also means "bitwise equality" */
+	bool		opcisbitwise BKI_DEFAULT(f);
 } FormData_pg_opclass;
 
 /* ----------------
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index d93a79a..4ab4cc7 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -2577,6 +2577,7 @@ typedef struct CreateOpClassStmt
 	TypeName   *datatype;		/* datatype of indexed column */
 	List	   *items;			/* List of CreateOpClassItem nodes */
 	bool		isDefault;		/* Should be marked as default for type? */
+	bool		isBitwise;		/* Is opclass equality bitwise? */
 } CreateOpClassStmt;
 
 #define OPCLASS_ITEM_OPERATOR		1
diff --git a/src/include/parser/kwlist.h b/src/include/parser/kwlist.h
index 00ace84..d6a8e8f 100644
--- a/src/include/parser/kwlist.h
+++ b/src/include/parser/kwlist.h
@@ -58,6 +58,7 @@ PG_KEYWORD("between", BETWEEN, COL_NAME_KEYWORD)
 PG_KEYWORD("bigint", BIGINT, COL_NAME_KEYWORD)
 PG_KEYWORD("binary", BINARY, TYPE_FUNC_NAME_KEYWORD)
 PG_KEYWORD("bit", BIT, COL_NAME_KEYWORD)
+PG_KEYWORD("bitwise", BITWISE, UNRESERVED_KEYWORD)
 PG_KEYWORD("boolean", BOOLEAN_P, COL_NAME_KEYWORD)
 PG_KEYWORD("both", BOTH, RESERVED_KEYWORD)
 PG_KEYWORD("by", BY, UNRESERVED_KEYWORD)
diff --git a/src/test/regress/expected/create_am.out b/src/test/regress/expected/create_am.out
index 84da403..241b61c 100644
--- a/src/test/regress/expected/create_am.out
+++ b/src/test/regress/expected/create_am.out
@@ -13,7 +13,7 @@ CREATE INDEX grect2ind2 ON fast_emp4000 USING gist2 (home_base);
 ERROR:  data type box has no default operator class for access method "gist2"
 HINT:  You must specify an operator class for the index or define a default operator class for the data type.
 -- Make operator class for boxes using gist2
-CREATE OPERATOR CLASS box_ops DEFAULT
+CREATE OPERATOR CLASS box_ops DEFAULT BITWISE
 	FOR TYPE box USING gist2 AS
 	OPERATOR 1	<<,
 	OPERATOR 2	&<,
diff --git a/src/test/regress/sql/create_am.sql b/src/test/regress/sql/create_am.sql
index a7f6de7..46b5ca0 100644
--- a/src/test/regress/sql/create_am.sql
+++ b/src/test/regress/sql/create_am.sql
@@ -14,7 +14,7 @@ CREATE ACCESS METHOD bogus TYPE INDEX HANDLER heap_tableam_handler;
 CREATE INDEX grect2ind2 ON fast_emp4000 USING gist2 (home_base);
 
 -- Make operator class for boxes using gist2
-CREATE OPERATOR CLASS box_ops DEFAULT
+CREATE OPERATOR CLASS box_ops DEFAULT BITWISE
 	FOR TYPE box USING gist2 AS
 	OPERATOR 1	<<,
 	OPERATOR 2	&<,
