What data type for storing EUI-64 address in (postgresql) database -


what datatype storing eui-64 address (for zigbee nodes)?

eui-64 address 8 octets. can gather should not considered integer such, though can make 64 bit integer out of them. seems obvious use bigint, though "signed" unfortunately makes bit messy.

i use numeric(8), there no built in conversions represent hex (though write one).

i use char(16), seems wasteful.

all of these options usable each seems bit messy. i'm wondering if has thoughts on or way haven't thought of. using bigint, working fine far. allows me use "to_hex" represent address, can foresee problems unless handle sign-ness properly.

thanks.

i write own data type it, using code macaddr template.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -