Wire protocol encoding for 'inet' type is defined unreliably

From: Duncan Smith <Duncan(at)xrtc(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Wire protocol encoding for 'inet' type is defined unreliably
Date: 2015-03-25 22:33:38
Message-ID: 1427322818.3613692.245294397.12EB3E23@webmail.messagingengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

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?

--
Duncan Smith

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2015-03-25 23:14:12 Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version
Previous Message Tom Lane 2015-03-25 19:57:34 Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version