On 16/04/2014 17:14, Alvaro Herrera wrote:
Marco Atzeri wrote:
On 13/04/2014 18:09, Tom Lane wrote:
Andres Freund <and...@2ndquadrant.com> writes:
On 2014-04-12 16:35:48 -0400, Tom Lane wrote:
In principle, that commit shouldn't have affected behavior for pg_hba
entries with numeric address fields ...
Hm. getaddrinfo.c has this bit:
/* Unsupported flags. */
if (flags & NI_NAMEREQD)
return EAI_AGAIN;
Yeah, and that flag is only ever specified when attempting to do reverse
lookup on a client address to see if it matches a non-numeric pg_hba
entry.
I don't know if this is relevant, but perhaps we're defining the
constants in a way that conflicts with the values defined by cygwin. A
very quick search finds a 2007 patch for Mutt[1] that seems to have
NI_NAMEREQD defined as 8 somewhere, while 4 is NI_NOFQDN. But we have
this in getaddrinfo.h:
#ifndef NI_NAMEREQD
#define NI_NAMEREQD 4
#endif
So maybe we're doing something wrong. Indeed, my system has in
/usr/include/netdb.h
# define NI_NAMEREQD 8 /* Don't return numeric addresses. */
You'd do well to research this more, I think.
[1] http://marc.info/?l=mutt-dev&m=117752314512877&w=2
on cygwin both 32 and 64 bit I see
netdb.h:#define NI_NAMEREQD 0x4 /* Not being able to resolve is
an error. */
same on
w32api/ws2tcpip.h:#define NI_NAMEREQD 0x04
curiosly I see also on
roken-common.h:#define NI_NAMEREQD 0x02
$ cygcheck -f /usr/include/roken-common.h
libkrb5-devel-1.5.3-1
not sure if it has any relevance at all in this case.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers