Re: macaddr 64 bit (EUI-64) datatype support - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: macaddr 64 bit (EUI-64) datatype support
Date
Msg-id 6d8bb809-7c25-5c7d-09b4-d88a72fd841d@dalibo.com
Whole thread Raw
In response to Re: macaddr 64 bit (EUI-64) datatype support  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: macaddr 64 bit (EUI-64) datatype support  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 12/10/2016 14:32, Alvaro Herrera wrote:
> Julien Rouhaud wrote:
> 
>> and you can instead make macaddr64 support both format, and provide a
>> macaddr::macaddr64 cast
> 
> Having macaddr64 support both formats sounds nice, but how does it work?
> Will we have to reserve one additional bit to select the representation?
> That would make the type be 65 bits which is a clear loser IMO.
> 
> Is it allowed to just leave 16 bits as zeroes which would indicate that
> the address is EUI48?  I wouldn't think so ...
> 

From what I read, you can indicate it's an EUI-48 address by storing
FF:FF (or FF:FE for MAC-48) in 4th and 5th bytes of the EUI-64 address.

-- 
Julien Rouhaud
http://dalibo.com - http://dalibo.org



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
Next
From: Stephen Frost
Date:
Subject: Re: Remove "Source Code" column from \df+ ?