1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-18 02:02:55 +03:00

Document that pg_getaddrinfo_all does not accept null hints

While the underlying getaddrinfo call accepts a null pointer for
the hintp parameter, pg_getaddrinfo_all does not.  Document this
difference with a comment to make it clear.

Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reported-by: Sergey Tatarintsev <s.tatarintsev@postgrespro.ru>
Discussion: https://postgr.es/m/1e5efc94-407e-40b8-8b10-4d25f823c6d7@postgrespro.ru
This commit is contained in:
Daniel Gustafsson
2025-11-13 16:35:07 +01:00
parent 7dc4fa9141
commit d22cc7326c

View File

@@ -48,6 +48,9 @@ static int getnameinfo_unix(const struct sockaddr_un *sa, int salen,
/*
* pg_getaddrinfo_all - get address info for Unix, IPv4 and IPv6 sockets
*
* The API of this routine differs from the standard getaddrinfo() definition
* in that it requires a valid hintp, a null pointer is not allowed.
*/
int
pg_getaddrinfo_all(const char *hostname, const char *servname,