postgresql/src/include/libpq
Tom Lane c6a91c92b5 Produce a more useful error message for over-length Unix socket paths.
The length of a socket path name is constrained by the size of struct
sockaddr_un, and there's not a lot we can do about it since that is a
kernel API.  However, it would be a good thing if we produced an
intelligible error message when the user specifies a socket path that's too
long --- and getaddrinfo's standard API is too impoverished to do this in
the natural way.  So insert explicit tests at the places where we construct
a socket path name.  Now you'll get an error that makes sense and even
tells you what the limit is, rather than something generic like
"Non-recoverable failure in name resolution".

Per trouble report from Jeremy Drake and a fix idea from Andrew Dunstan.
2012-11-29 19:57:17 -05:00
..
auth.h pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
be-fsstubs.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
crypt.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
hba.h Rename ident authentication over local connections to peer 2011-03-19 18:44:35 +01:00
ip.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
libpq-be.h Remove arbitrary limitation on length of common name in SSL certificates. 2012-02-23 15:48:09 -05:00
libpq-fs.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
libpq.h pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
md5.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
pqcomm.h Produce a more useful error message for over-length Unix socket paths. 2012-11-29 19:57:17 -05:00
pqformat.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
pqsignal.h Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00