macaddr 64 bit (EUI-64) datatype support

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: macaddr 64 bit (EUI-64) datatype support
Date: 2016-10-12 06:30:52
Message-ID: CAJrrPGcUi8ZH+KkK+=TctNQ+EfkeCEHtMU_yo1mvX8hsk_ghNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

There was bug that is raised in [1] related to storing EUI-64 mac address
in PostgreSQL MAC address datatype.

As the current macaddr datatype stores only 48 bit MAC address only, and
now a days
people are adopting to EUI-64 format of MAC address. So it better to add
the support
in PostgreSQL.

Here I attached a POC patch that adds the support for EUI-64 MAC address
storage with a
new datatype macaddr64. Currently this type takes only EUI-64 datatype, not
accepts 48
bit MAC address.

Before continuing and adding more details for macaddr64 datatype, it is not
possible to
add the support for current macaddr datatype as it is a fixed size datatype
that is stored
in the disk. So any enhancements to change it from 48 to 64 bit will give
problems to
pg_upgrade.

As we are moving to PostgreSQL 10, so are there any plans of backward
compatiblity
breakage, so the existing macaddr datatype itself can be changed to support
both
48 and 64 bit MAC addresses. If not, I will try update the POC patch with
more details
similar like macaddr datatype.

[1] -
https://www.postgresql.org/message-id/20161010162001.1413.12486%40wrigleys.postgresql.org

Regards,
Hari Babu
Fujitsu Australia

Attachment Content-Type Size
macaddr64_poc.patch application/octet-stream 18.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-10-12 06:52:57 Re: macaddr 64 bit (EUI-64) datatype support
Previous Message Petr Jelinek 2016-10-12 06:21:00 Re: autonomous transactions