Re: macaddr 64 bit (EUI-64) datatype support
Vitaly Burovoy <vitaly.burovoy@gmail.com>
From: Vitaly Burovoy <vitaly.burovoy@gmail.com>
To: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Kuntal Ghosh <kuntalghosh.2007@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Stephen Frost <sfrost@snowman.net>, Shay Rojansky <roji@roji.org>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Alvaro Herrera <alvherre@2ndquadrant.com>,
Julien Rouhaud <julien.rouhaud@dalibo.com>, Craig Ringer <craig@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-01-26T10:42:18Z
Lists: pgsql-hackers
On 1/25/17, Haribabu Kommi <kommi.haribabu@gmail.com> wrote: > On Wed, Jan 25, 2017 at 6:43 PM, Vitaly Burovoy <vitaly.burovoy@gmail.com> > wrote: > >> On 1/23/17, Haribabu Kommi <kommi.haribabu@gmail.com> wrote: >> > The patch is split into two parts. >> > 1. Macaddr8 datatype support >> > 2. Contrib module support. >> >> Hello, >> >> I'm sorry for the delay. >> The patch is almost done, but I have two requests since the last review. >> > > Thanks for the review. > > >> 1. >> src/backend/utils/adt/mac8.c: >> + int a, >> + b, >> + c, >> + d = 0, >> + e = 0, >> ... >> >> There is no reason to set them as 0. For EUI-48 they will be >> reassigned in the "if (count != 8)" block, for EUI-64 -- in one of >> sscanf. >> They could be set to "d = 0xFF, e = 0xFE," and avoid the "if" block >> mentioned above, but it makes the code be much less readable. >> <overquoted> > > Changed accordingly. I'm going to do (I hope) a final review tonight. Please, remove initialization of the variables "d" and "e" since there is really no reason to keep them be zero for a short time. -- Best regards, Vitaly Burovoy
Commits
-
Add support for EUI-64 MAC addresses as macaddr8
- c7a9fa399d55 10.0 landed
-
perltidy pg_dump TAP tests
- 6af8b89adba1 10.0 cited