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'
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.
Yes, this code block should be placed at first place inside of for loop
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.