Wire protocol encoding for 'inet' type is defined unreliably - Mailing list pgsql-bugs

From Duncan Smith
Subject Wire protocol encoding for 'inet' type is defined unreliably
Date
Msg-id 1427322818.3613692.245294397.12EB3E23@webmail.messagingengine.com
Whole thread Raw
Responses Re: Wire protocol encoding for 'inet' type is defined unreliably  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-bugs by date:

Previous
From: Pedro Gimeno
Date:
Subject: Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version
Next
From: zjwincek@oakland.edu
Date:
Subject: BUG #12902: The PostgreSQL repository lacks the pg_top package.