From: Tom Lane <tgl@sss.pgh.pa.us>
To: Duncan Smith <Duncan@xrtc.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Wire protocol encoding for 'inet' type is defined unreliably
Date: Thu, 26 Mar 2015 11:31:51 -0400
Message-ID: <8169.1427383911@sss.pgh.pa.us> (raw)
In-Reply-To: <1427322818.3613692.245294397.12EB3E23@webmail.messagingengine.com>
References: <1427322818.3613692.245294397.12EB3E23@webmail.messagingengine.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Duncan Smith <Duncan@xrtc.net> writes:
> I noticed today that the network encoding of the 'inet' type uses values
> derived from the system header file <sys/socket.h> to tag whether the
> address is IPv4 or IPv6.
> In particular, <src/include/utils/inet.h> defines PGSQL_AF_INET to be
> AF_INET, which is 2 on my system. Wouldn't it be better to use a more
> constant constant for this purpose?
Yeah, in a green field that would have been the thing to do, but at
this point it's years too late to change it. If there are any platforms
where AF_INET is different from 2, changing those constants would break
both on-disk storage and binary-format dumps for them.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, Duncan@xrtc.net
Subject: Re: Wire protocol encoding for 'inet' type is defined unreliably
In-Reply-To: <8169.1427383911@sss.pgh.pa.us>
References: <1427322818.3613692.245294397.12EB3E23@webmail.messagingengine.com> <8169.1427383911@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