AF_UNSPEC vs PF_UNSPEC
While wondering what the heck is going on in
/messages/by-id/534E8FBB.9060006@gmail.com
I chanced to notice that pgstat.c and a couple of other places set
up arguments for getaddrinfo() like this:
hints.ai_family = PF_UNSPEC;
whereas the Single Unix Spec says clearly that AF_UNSPEC is what
to write if you're not intending to constrain the address family.
AF_UNSPEC is what we use in the majority of places, too.
On Linux, at least, these symbols have the same value so it doesn't
matter; but I wonder whether they are different on recent Cygwin.
Anyway, I think this is clearly wrong and we should change it.
I see a "PF_INET" that presumably ought to be "AF_INET" in
pg_dump/parallel.c, too.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers