From: | Andreas Karlsson <andreas(at)proxel(dot)se> |
---|---|
To: | Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Tom Dunstan <pgsql(at)tomd(dot)cc> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: IPv6 link-local addresses and init data type |
Date: | 2016-05-31 01:44:34 |
Message-ID: | 574CEC82.3000108@proxel.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 05/31/2016 02:37 AM, Haribabu Kommi wrote:
> The following is the content of IPV6 representation from RFC 4007
>
> The following addresses
>
> fe80::1234 (on the 1st link of the node)
> ff02::5678 (on the 5th link of the node)
> ff08::9abc (on the 10th organization of the node)
>
> would be represented as follows:
>
> fe80::1234%1
> ff02::5678%5
> ff08::9abc%10
>
> (Here we assume a natural translation from a zone index to the
> <zone_id> part, where the Nth zone of any scope is translated into
> "N".)
>
> If we use interface names as <zone_id>, those addresses could also be
> represented as follows:
>
> fe80::1234%ne0
> ff02::5678%pvc1.3
> ff08::9abc%interface10
>
> The digit and string both are considered as proper format.
Since we cannot tell if %1 is the same interface as %ne0, isn't the best
thing we can do to just store them as raw strings and treat them as
different addresses from PostgreSQL's point of view? I do not see any
problem with doing so.
> The % delimiter character is not only used at the end of the IPV6 address,
> from the RFC document, it is possible as follows also.
>
> fe80::%2/64
>
> we need to handle both the scenarios, it may not be a straight
> forward to store the zone id data.
This case needs to be handled by the parser for at least the cidr type,
but I do not think it would make parsing any trickier.
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Kouhei Kaigai | 2016-05-31 02:05:40 | Re: Does people favor to have matrix data type? |
Previous Message | Andreas Karlsson | 2016-05-31 01:37:20 | Re: Parallel safety tagging of extension functions |