postgresql/src/include/libpq
Tom Lane 4af446e7cd 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:01 -05:00
..
auth.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
be-fsstubs.h Add API for 64-bit large object access. Now users can access up to 2012-10-07 08:36:48 +09:00
crypt.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
hba.h Parse pg_ident.conf when it's loaded, keeping it in memory in parsed format. 2012-09-21 17:54:39 +03:00
ip.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
libpq-be.h Remove arbitrary limitation on length of common name in SSL certificates. 2012-02-23 15:48:04 -05:00
libpq-fs.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
libpq.h Support having multiple Unix-domain sockets per postmaster. 2012-08-10 17:27:15 -04:00
md5.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pqcomm.h Produce a more useful error message for over-length Unix socket paths. 2012-11-29 19:57:01 -05:00
pqformat.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pqsignal.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00