Re: Update: mac.c update, patch now on ftp - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: Update: mac.c update, patch now on ftp
Date
Msg-id 3976972A.8C644672@alumni.caltech.edu
Whole thread Raw
In response to Re: Update: mac.c update, patch now on ftp  (Larry Rosenman <ler@lerctr.org>)
Responses Re: Update: mac.c update, patch now on ftp  (Larry Rosenman <ler@lerctr.org>)
List pgsql-hackers
> I was thinking of making the following:
> 1) macaddr_manuf function that returns the first 3 octets of a macaddr
> 2) a macaddr_manuf TYPE that can be used for the table
> 3) supply the ouiparse.awk to generate a set of INSERT statements
>    to load a table
> 4) allow the above table to be indexed.

Why not use a comparison function which knows how to compare just the
manufacturer's id fields? Or define a function which masks a mac address
to return the id fields and zeros everywhere else (so you can then use
the "normal" comparison functions)?

Defining a new type to allow this masking and comparison seems more than
necessary (which, if this argument holds up, would make it undesirable).
We can still define functional indices so that a table lookup will be
fast in any case.
                      - Thomas


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: btree split logic is fragile in the presence of lar ge index items
Next
From: Larry Rosenman
Date:
Subject: Re: Update: mac.c update, patch now on ftp