Copy and store addrinfo in libpq-owned private memory This refactors libpq to copy addrinfos returned by getaddrinfo to memory owned by libpq such that future improvements can alter for example the order of entries.
As a nice side effect of this refactor the mechanism for iteration over addresses in PQconnectPoll is now identical to its iteration over hosts. Author: Jelte Fennema <[email protected]> Reviewed-by: Aleksander Alekseev <[email protected]> Reviewed-by: Michael Banck <[email protected]> Reviewed-by: Andrey Borodin <[email protected]> Discussion: https://postgr.es/m/pr3pr83mb04768e2ff04818eeb2179949f7...@pr3pr83mb0476.eurprd83.prod.outlook.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/44d85ba5a3361dea371d23bd91777ef4c0c4e506 Modified Files -------------- src/include/libpq/pqcomm.h | 6 ++ src/interfaces/libpq/fe-connect.c | 112 +++++++++++++++++++++++++++----------- src/interfaces/libpq/libpq-int.h | 7 ++- src/tools/pgindent/typedefs.list | 1 + 4 files changed, 92 insertions(+), 34 deletions(-)
