Re: mac.c

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: mac.c
Date: 2000-08-07 15:40:43
Message-ID: 398ED87B.F9CF9E28@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> We still need to load a *TABLE* with a 3 byte hex number (at least) for
> the OUI, and a text field for the actual manufacturer (see my posted
> ouiparse.awk script). How do we store that 3 byte hex number (we don't have
> a type that I'm aware of...)?

We extend those three bytes to a full zero-filled mac address when
filling the table. Is there any downside to that?

> Don't get me wrong, I like your idea, but I'm not sure what it buys us after
> the later suggestions I made of returning a half-zeroed mac...

It buys us a natural way of comparing classes of mac addresses. And we
don't have to invoke any extra functions to do it, so you don't need to
remember an obscure function name. Also, it could be extended to do
simple pattern matching a la the LIKE string code:

SELECT * FROM t1 WHERE t1.addr LIKE '00:01:23:__:05:%';

btw, are fields "a"-"f" a general convention in labeling mac address
fields? Or is that an artifact of Postgres' definition?

- Thomas

In response to

  • Re: mac.c at 2000-08-07 10:25:57 from Larry Rosenman

Responses

  • RE: mac.c at 2000-08-07 16:51:19 from Larry Rosenman

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2000-08-07 15:56:35 Re: was: bad datatypes time and timestamp - wrong gcc option
Previous Message Tom Lane 2000-08-07 15:35:54 Re: Trouble with float4 after upgrading from 6.5.3 to 7.0.2