Index binary data

The binaryvar and binary18 data types support indexing using the B-tree access method for single-column indexes and composite indexes. Nested-loop join operations are also supported.

For example, given the following table:
CREATE TABLE network_table (
mac_address binaryvar NOT NULL,
device_name varchar(128),
device_location varchar(128),
device_ip_address binaryvar,
date_purchased date,
last_serviced date)
The following statement can be used to create the index:
CREATE UNIQUE INDEX netmac_pk ON network_table (mac_address) USING btree;