From: Tom Lane <tgl@sss.pgh.pa.us>
To: denis.feklushkin@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18712: inet value ::2 handling goes not as expected
Date: Sun, 17 Nov 2024 12:05:11 -0500
Message-ID: <3065772.1731863111@sss.pgh.pa.us> (raw)
In-Reply-To: <18712-f787a146022a78e4@postgresql.org>
References: <18712-f787a146022a78e4@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> I think that statement
> select '::0.0.0.2'::inet;
> should return '::0.0.0.2' value, not '::2'
> I think this is what was intended in the Postgres sources. But it seems that
> this line is never executed:
> https://github.com/postgres/postgres/blob/7b88529f4363994450bd4cd3c172006a8a77e222/src/port/inet_net...
Hmm ... you are right that that code doesn't do what it seems to
intend to, because by the time that we get to this logic we have
i == 7 not i == 6. But I'm not sure if we should change it after
all this time. We're about as likely to get complaints as kudos,
I fear. And the output isn't incorrect, just not-per-style.
I wonder whether ISC ever changed their version?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, denis.feklushkin@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18712: inet value ::2 handling goes not as expected
In-Reply-To: <3065772.1731863111@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox